Package io.etcd.jetcd.op
Class TxnImpl
java.lang.Object
io.etcd.jetcd.op.TxnImpl
- All Implemented Interfaces:
Txn
Build an etcd transaction.
-
Method Summary
Modifier and TypeMethodDescriptioncommit()tries to commit the transaction.takes a list of operations.takes a list of comparison.static TxnImplnewTxn(Function<io.etcd.jetcd.api.TxnRequest, CompletableFuture<TxnResponse>> f, ByteSequence namespace) takes a list of operations.
-
Method Details
-
newTxn
public static TxnImpl newTxn(Function<io.etcd.jetcd.api.TxnRequest, CompletableFuture<TxnResponse>> f, ByteSequence namespace) -
If
Description copied from interface:Txntakes a list of comparison. If all comparisons passed in succeed, the operations passed into Then() will be executed. Or the operations passed into Else() will be executed. -
Then
Description copied from interface:Txntakes a list of operations. The Ops list will be executed, if the comparisons passed in If() succeed. -
Else
Description copied from interface:Txntakes a list of operations. The Ops list will be executed, if the comparisons passed in If() fail. -
commit
Description copied from interface:Txntries to commit the transaction.
-