Transaction (Apache ZooKeeper - Server 3.7.0 API)
Date: 2021-03-17

org.apache.zookeeper

## Class Transaction

- java.lang.Object
- - org.apache.zookeeper.Transaction

-     @InterfaceAudience.Public
      public class Transaction
      extends 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 and Description
    --- | ---
    `protected` | `Transaction(ZooKeeper zk)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Transaction` | `check(String path, int version)`
    `List<OpResult>` | `commit()`
    `void` | `commit(AsyncCallback.MultiCallback cb, Object ctx)`
    `Transaction` | `create(String path, byte[] data, List<ACL> acl, CreateMode createMode)`
    `Transaction` | `delete(String path, int version)`
    `Transaction` | `setData(String path, byte[] data, int version)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### Transaction

          protected Transaction(ZooKeeper zk)

  - ### Method Detail

    - #### create

          public Transaction create(String path,
                                    byte[] data,
                                    List<ACL> acl,
                                    CreateMode createMode)

    - #### delete

          public Transaction delete(String path,
                                    int version)

    - #### check

          public Transaction check(String path,
                                   int version)

    - #### setData

          public Transaction setData(String path,
                                     byte[] data,
                                     int version)

    - #### commit

          public List<OpResult> commit()
                                throws InterruptedException,
                                       KeeperException

      Throws:
        `InterruptedException`
        `KeeperException`

    - #### commit

          public void commit(AsyncCallback.MultiCallback cb,
                             Object ctx)

Copyright © 2008–2021 The Apache Software Foundation. All rights reserved.