Interface CacheTopologyHandler
public interface CacheTopologyHandler
The link between
LocalTopologyManager and StateTransferManager.- Since:
- 5.2
- Author:
- Dan Berindei
-
Method Summary
Modifier and TypeMethodDescriptionvoidonTopologyReceived(CacheTopology cacheTopology) Invoked when a topology is received.rebalance(CacheTopology cacheTopology) Invoked when state transfer has to be started.updateConsistentHash(CacheTopology cacheTopology) Invoked when the CH has to be immediately updated because of a leave or when the state transfer has completed and we have to install a permanent CH (pendingCH == null).
-
Method Details
-
updateConsistentHash
Invoked when the CH has to be immediately updated because of a leave or when the state transfer has completed and we have to install a permanent CH (pendingCH == null). A state transfer is not always required. -
rebalance
Invoked when state transfer has to be started. The caller will not consider the local rebalance done when this method returns. Instead, the handler will have to callLocalTopologyManager.confirmRebalancePhase(String, int, int, Throwable) -
onTopologyReceived
Invoked when a topology is received.Invokes the listener every time a new topology is received. The topology might have a pending consistent hash, or it might already be stable.
- Parameters:
cacheTopology- The received cache topology.
-