Class ZookeeperQuiesceHandler

java.lang.Object
org.openspaces.pu.container.servicegrid.ZookeeperQuiesceHandler
All Implemented Interfaces:
Closeable, AutoCloseable

public class ZookeeperQuiesceHandler extends Object implements Closeable
  • Constructor Details

    • ZookeeperQuiesceHandler

      public ZookeeperQuiesceHandler(String puName, org.openspaces.zookeeper.attribute_store.ZooKeeperAttributeStore attributeStore)
  • Method Details

    • addListener

      public void addListener(ZookeeperClient zookeeperClient, PUServiceBeanImpl bean)
    • watchQuiesceState

      public void watchQuiesceState(PUServiceBeanImpl bean)
      Keeps the instance in sync with the quiesce state in zookeeper (the source of truth - the manager writes it before it notifies the instances it knows about). Without it, an instance that read the state while starting misses a change the manager makes before the instance is visible to the admin - e.g. it starts quiesced from a scale out that ends a moment later, and stays quiesced forever. Call once the processing unit is started.
    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Throws:
      IOException
    • getUpdatedQuiesceDetails

      public InternalQuiesceDetails getUpdatedQuiesceDetails()
    • updateInstanceState

      public void updateInstanceState(InternalQuiesceDetails applied)
      Records this instance as quiesced in the instances state of the quiesce state in zookeeper - only if the state is still the one this instance applied.
    • getZkPath

      public static String getZkPath(String puName)