Class ZookeeperQuiesceHandler
java.lang.Object
org.openspaces.pu.container.servicegrid.ZookeeperQuiesceHandler
- All Implemented Interfaces:
Closeable, AutoCloseable
-
Constructor Summary
ConstructorsConstructorDescriptionZookeeperQuiesceHandler(String puName, org.openspaces.zookeeper.attribute_store.ZooKeeperAttributeStore attributeStore) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddListener(ZookeeperClient zookeeperClient, PUServiceBeanImpl bean) voidclose()static StringvoidRecords 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.voidKeeps 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).
-
Constructor Details
-
ZookeeperQuiesceHandler
public ZookeeperQuiesceHandler(String puName, org.openspaces.zookeeper.attribute_store.ZooKeeperAttributeStore attributeStore)
-
-
Method Details
-
addListener
-
watchQuiesceState
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
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
getUpdatedQuiesceDetails
-
updateInstanceState
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
-