org.apache.storm.trident.topology.state

## Class TransactionalState

- java.lang.Object
- - org.apache.storm.trident.topology.state.TransactionalState

- Direct Known Subclasses:
    TestTransactionalState

      public class TransactionalState
      extends Object

  Class that contains the logic to extract the transactional state info from zookeeper. All transactional state is kept in zookeeper. This class only contains references to Curator, which is used to get all info from zookeeper.

- - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `TransactionalState(Map<String,Object> conf, String id, String subroot)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()`
    `protected static void` | `createNode(org.apache.storm.shade.org.apache.curator.framework.CuratorFramework curator, String path, byte[] data, List<org.apache.storm.shade.org.apache.zookeeper.data.ACL> acls, org.apache.storm.shade.org.apache.zookeeper.CreateMode mode)`
    `void` | `delete(String path)`
    `protected static String` | `forPath(org.apache.storm.shade.org.apache.curator.framework.api.PathAndBytesable<String> builder, String path, byte[] data)`
    `Object` | `getData(String path)`
    `List<String>` | `list(String path)`
    `void` | `mkdir(String path)`
    `static TransactionalState` | `newCoordinatorState(Map<String,Object> conf, String id)`
    `static TransactionalState` | `newUserState(Map<String,Object> conf, String id)`
    `void` | `setData(String path, Object obj)`

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

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

- - ### Constructor Detail

    - #### TransactionalState

          protected TransactionalState(Map<String,Object> conf,
                                       String id,
                                       String subroot)

  - ### Method Detail

    - #### newUserState

          public static TransactionalState newUserState(Map<String,Object> conf,
                                                        String id)

    - #### newCoordinatorState

          public static TransactionalState newCoordinatorState(Map<String,Object> conf,
                                                               String id)

    - #### forPath

          protected static String forPath(org.apache.storm.shade.org.apache.curator.framework.api.PathAndBytesable<String> builder,
                                          String path,
                                          byte[] data)
                                   throws Exception

      Throws:
        `Exception`

    - #### createNode

          protected static void createNode(org.apache.storm.shade.org.apache.curator.framework.CuratorFramework curator,
                                           String path,
                                           byte[] data,
                                           List<org.apache.storm.shade.org.apache.zookeeper.data.ACL> acls,
                                           org.apache.storm.shade.org.apache.zookeeper.CreateMode mode)
                                    throws Exception

      Throws:
        `Exception`

    - #### setData

          public void setData(String path,
                              Object obj)

    - #### delete

          public void delete(String path)

    - #### list

          public List<String> list(String path)

    - #### mkdir

          public void mkdir(String path)

    - #### getData

          public Object getData(String path)

    - #### close

          public void close()

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