Package org.apache.zookeeper
Class Transaction
- java.lang.Object
-
- org.apache.zookeeper.Transaction
-
@Public public class Transaction extends java.lang.Object
Provides a builder style interface for doing multiple updates. This is really just a thin layer on top of Zookeeper.multi().- Since:
- 3.4.0
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
Transaction(ZooKeeper zk)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Transaction
check(java.lang.String path, int version)
java.util.List<OpResult>
commit()
void
commit(AsyncCallback.MultiCallback cb, java.lang.Object ctx)
Transaction
create(java.lang.String path, byte[] data, java.util.List<ACL> acl, CreateMode createMode)
Transaction
delete(java.lang.String path, int version)
Transaction
setData(java.lang.String path, byte[] data, int version)
-
-
-
Constructor Detail
-
Transaction
protected Transaction(ZooKeeper zk)
-
-
Method Detail
-
create
public Transaction create(java.lang.String path, byte[] data, java.util.List<ACL> acl, CreateMode createMode)
-
delete
public Transaction delete(java.lang.String path, int version)
-
check
public Transaction check(java.lang.String path, int version)
-
setData
public Transaction setData(java.lang.String path, byte[] data, int version)
-
commit
public java.util.List<OpResult> commit() throws java.lang.InterruptedException, KeeperException
- Throws:
java.lang.InterruptedException
KeeperException
-
commit
public void commit(AsyncCallback.MultiCallback cb, java.lang.Object ctx)
-
-