Package io.etcd.jetcd.kv
Class TxnResponse
- java.lang.Object
-
- io.etcd.jetcd.impl.AbstractResponse<io.etcd.jetcd.api.TxnResponse>
-
- io.etcd.jetcd.kv.TxnResponse
-
- All Implemented Interfaces:
Response
public class TxnResponse extends AbstractResponse<io.etcd.jetcd.api.TxnResponse>
TxnResponse returned by a transaction call contains lists of put, get, delete responses corresponding to either the compare in txn.IF is evaluated to true or false.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.etcd.jetcd.Response
Response.Header
-
-
Constructor Summary
Constructors Constructor Description TxnResponse(io.etcd.jetcd.api.TxnResponse txnResponse, ByteSequence namespace)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<DeleteResponse>getDeleteResponses()Returns a list of DeleteResponse; empty list if none.java.util.List<GetResponse>getGetResponses()Returns a list of GetResponse; empty list if none.java.util.List<PutResponse>getPutResponses()Returns a list of PutResponse; empty list if none.java.util.List<TxnResponse>getTxnResponses()Returns a list of TxnResponse; empty list if none.booleanisSucceeded()Returns true if the compare evaluated to true or false otherwise.-
Methods inherited from class io.etcd.jetcd.impl.AbstractResponse
getHeader, getResponse, getResponseHeader, toString
-
-
-
-
Constructor Detail
-
TxnResponse
public TxnResponse(io.etcd.jetcd.api.TxnResponse txnResponse, ByteSequence namespace)
-
-
Method Detail
-
isSucceeded
public boolean isSucceeded()
Returns true if the compare evaluated to true or false otherwise.- Returns:
- if succeeded.
-
getDeleteResponses
public java.util.List<DeleteResponse> getDeleteResponses()
Returns a list of DeleteResponse; empty list if none.- Returns:
- delete responses.
-
getGetResponses
public java.util.List<GetResponse> getGetResponses()
Returns a list of GetResponse; empty list if none.- Returns:
- get responses.
-
getPutResponses
public java.util.List<PutResponse> getPutResponses()
Returns a list of PutResponse; empty list if none.- Returns:
- put responses.
-
getTxnResponses
public java.util.List<TxnResponse> getTxnResponses()
Returns a list of TxnResponse; empty list if none.- Returns:
- txn responses.
-
-