org.apache.hadoop.util.curator

## Class ZKCuratorManager.SafeTransaction

- java.lang.Object
- - org.apache.hadoop.util.curator.ZKCuratorManager.SafeTransaction

- Enclosing class:
    org.apache.hadoop.util.curator.ZKCuratorManager

      public class ZKCuratorManager.SafeTransaction
      extends Object

  Use curator transactions to ensure zk-operations are performed in an all or nothing fashion. This is equivalent to using ZooKeeper#multi. TODO (YARN-3774): Curator 3.0 introduces CuratorOp similar to Op. We ll have to rewrite this inner class when we adopt that.

- - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `commit()`
    `void` | `create(String path, byte[] data, List<org.apache.zookeeper.data.ACL> acl, org.apache.zookeeper.CreateMode mode)`
    `void` | `delete(String path)`
    `void` | `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`

- - ### Method Detail

    - #### commit

          public void commit()
                      throws Exception

      Throws:
        `Exception`

    - #### create

          public void create(String path,
                             byte[] data,
                             List<org.apache.zookeeper.data.ACL> acl,
                             org.apache.zookeeper.CreateMode mode)
                      throws Exception

      Throws:
        `Exception`

    - #### delete

          public void delete(String path)
                      throws Exception

      Throws:
        `Exception`

    - #### setData

          public void setData(String path,
                              byte[] data,
                              int version)
                       throws Exception

      Throws:
        `Exception`

Copyright © 2008–2022 Apache Software Foundation. All rights reserved.