public interface CuratorTransaction
Transactional/atomic operations. See ZooKeeper.multi(Iterable)
for
details on ZooKeeper transactions.
The general form for this interface is:
Here's an example that creates two nodes in a transaction
curator.inTransaction().operation().arguments().forPath(...).
and().more-operations.
and().commit();
curator.inTransaction().
create().forPath("/path-one", path-one-data).
and().create().forPath("/path-two", path-two-data).
and().commit();
Important: the operations are not submitted until
CuratorTransactionFinal.commit()
is called.
Modifier and Type | Method and Description |
---|---|
TransactionCheckBuilder |
check()
Start a check builder in the transaction
|
TransactionCreateBuilder |
create()
Start a create builder in the transaction
|
TransactionDeleteBuilder |
delete()
Start a delete builder in the transaction
|
TransactionSetDataBuilder |
setData()
Start a setData builder in the transaction
|
TransactionCreateBuilder create()
TransactionDeleteBuilder delete()
TransactionSetDataBuilder setData()
TransactionCheckBuilder check()