Package io.etcd.jetcd.op
Class TxnImpl
- java.lang.Object
-
- io.etcd.jetcd.op.TxnImpl
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.concurrent.CompletableFuture<TxnResponse>commit()tries to commit the transaction.TxnImplElse(Op... ops)takes a list of operations.TxnImplIf(Cmp... cmps)takes a list of comparison.static TxnImplnewTxn(java.util.function.Function<io.etcd.jetcd.api.TxnRequest,java.util.concurrent.CompletableFuture<TxnResponse>> f, ByteSequence namespace)TxnImplThen(Op... ops)takes a list of operations.
-
-
-
Method Detail
-
newTxn
public static TxnImpl newTxn(java.util.function.Function<io.etcd.jetcd.api.TxnRequest,java.util.concurrent.CompletableFuture<TxnResponse>> f, ByteSequence namespace)
-
If
public TxnImpl If(Cmp... cmps)
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
public TxnImpl Then(Op... ops)
Description copied from interface:Txntakes a list of operations. The Ops list will be executed, if the comparisons passed in If() succeed.
-
Else
public TxnImpl Else(Op... ops)
Description copied from interface:Txntakes a list of operations. The Ops list will be executed, if the comparisons passed in If() fail.
-
commit
public java.util.concurrent.CompletableFuture<TxnResponse> commit()
Description copied from interface:Txntries to commit the transaction.
-
-