Class ZookeeperStateMachineEnsemble<S,E>

Type Parameters:
S - the type of state
E - the type of event
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.InitializingBean, org.springframework.context.Lifecycle, org.springframework.context.Phased, org.springframework.context.SmartLifecycle, StateMachineEnsemble<S,E>, StateMachineReactiveLifecycle
Direct Known Subclasses:
LeaderZookeeperStateMachineEnsemble

public class ZookeeperStateMachineEnsemble<S,E> extends StateMachineEnsembleObjectSupport<S,E>
StateMachineEnsemble backed by a zookeeper.
  • Constructor Details

    • ZookeeperStateMachineEnsemble

      public ZookeeperStateMachineEnsemble(org.apache.curator.framework.CuratorFramework curatorClient, String basePath)
      Instantiates a new zookeeper state machine ensemble.
      Parameters:
      curatorClient - the curator client
      basePath - the base zookeeper path
    • ZookeeperStateMachineEnsemble

      public ZookeeperStateMachineEnsemble(org.apache.curator.framework.CuratorFramework curatorClient, String basePath, boolean cleanState, int logSize)
      Instantiates a new zookeeper state machine ensemble.
      Parameters:
      curatorClient - the curator client
      basePath - the base zookeeper path
      cleanState - if true clean existing state
      logSize - the log size
    • ZookeeperStateMachineEnsemble

      public ZookeeperStateMachineEnsemble(org.apache.curator.framework.CuratorFramework curatorClient, String basePath, boolean cleanState, int logSize, Consumer<com.esotericsoftware.kryo.Kryo> kryoCustomizer)
      Instantiates a new zookeeper state machine ensemble with a custom Kryo configurer for application-specific allowlist registrations.
      Parameters:
      curatorClient - the curator client
      basePath - the base zookeeper path
      cleanState - if true clean existing state
      logSize - the log size
      kryoCustomizer - optional callback invoked once per Kryo instance after the framework's default registrations are applied. Use this to register application-specific state and event types (typically enums) so that they are accepted by the allowlist. May be null.
      Since:
      4.0.2
  • Method Details