Example usage for org.springframework.statemachine.zookeeper ZookeeperStateMachinePersist ZookeeperStateMachinePersist

List of usage examples for org.springframework.statemachine.zookeeper ZookeeperStateMachinePersist ZookeeperStateMachinePersist

Introduction

In this page you can find the example usage for org.springframework.statemachine.zookeeper ZookeeperStateMachinePersist ZookeeperStateMachinePersist.

Prototype

public ZookeeperStateMachinePersist(CuratorFramework curatorClient, String path, String logPath, int logSize) 

Source Link

Document

Instantiates a new zookeeper state machine persist.

Usage

From source file:org.springframework.statemachine.zookeeper.ZookeeperStateMachineEnsemble.java

/**
 * Instantiates a new zookeeper state machine ensemble.
 *
 * @param curatorClient the curator client
 * @param basePath the base zookeeper path
 * @param cleanState if true clean existing state
 * @param logSize the log size/*w w w . j  a v  a 2  s  .  co m*/
 */
public ZookeeperStateMachineEnsemble(CuratorFramework curatorClient, String basePath, boolean cleanState,
        int logSize) {
    this.curatorClient = curatorClient;
    this.cleanState = cleanState;
    this.logSize = logSize;
    this.baseDataPath = basePath + "/data";
    this.statePath = baseDataPath + "/" + PATH_CURRENT;
    this.logPath = baseDataPath + "/" + PATH_LOG;
    this.memberPath = basePath + "/" + PATH_MEMBERS;
    this.mutexPath = basePath + "/" + PATH_MUTEX;
    this.persist = new ZookeeperStateMachinePersist<S, E>(curatorClient, statePath, logPath, logSize);
    setAutoStartup(true);
}