public interface CollectionStateWatcher
ZkStateReader.registerCollectionStateWatcher(String, CollectionStateWatcher)
and called whenever there is a change in the collection state or in the list of liveNodes.DocCollectionWatcher
Modifier and Type | Method and Description |
---|---|
boolean |
onStateChanged(Set<String> liveNodes,
DocCollection collectionState)
Called when either the collection we are registered against has a change of state or there is a change to the live nodes of our collection.
|
boolean onStateChanged(Set<String> liveNodes, DocCollection collectionState)
Note that, due to the way Zookeeper watchers are implemented, a single call may be the result of several state changes. Also, multiple calls to this method can be made with the same state, ie. without any new updates.
liveNodes
- the set of live nodescollectionState
- the new collection state (may be null if the collection has been
deleted)Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.