Package org.infinispan.topology
Interface ClusterTopologyManager
-
- All Known Implementing Classes:
ClusterTopologyManagerImpl
public interface ClusterTopologyManager
Maintains the topology for all the caches in the cluster.- Since:
- 5.2
- Author:
- Dan Berindei
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
ClusterTopologyManager.ClusterManagerStatus
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
broadcastRebalanceStart(String cacheName, CacheTopology cacheTopology, boolean totalOrder, boolean distributed)
void
broadcastShutdownCache(String cacheName, CacheTopology currentTopology, boolean totalOrder, boolean distributed)
void
broadcastStableTopologyUpdate(String cacheName, CacheTopology cacheTopology, boolean totalOrder, boolean distributed)
void
broadcastTopologyUpdate(String cacheName, CacheTopology cacheTopology, AvailabilityMode availabilityMode, boolean totalOrder, boolean distributed)
void
forceAvailabilityMode(String cacheName, AvailabilityMode availabilityMode)
void
forceRebalance(String cacheName)
RebalancingStatus
getRebalancingStatus(String cacheName)
Retrieves the rebalancing status of a cacheClusterTopologyManager.ClusterManagerStatus
getStatus()
CacheStatusResponse
handleJoin(String cacheName, Address joiner, CacheJoinInfo joinInfo, int viewId)
Signals that a new member is joining the cache.void
handleLeave(String cacheName, Address leaver, int viewId)
Signals that a member is leaving the cache.void
handleRebalancePhaseConfirm(String cacheName, Address node, int topologyId, Throwable throwable, int viewId)
Marks the rebalance as complete on the sender.void
handleShutdownRequest(String cacheName)
boolean
isRebalancingEnabled()
boolean
isRebalancingEnabled(String cacheName)
Returns whether rebalancing is enabled or disabled for this container.void
setInitialCacheTopologyId(String cacheName, int topologyId)
Sets the id of the initial topology in given cache.void
setRebalancingEnabled(boolean enabled)
Globally enables or disables whether automatic rebalancing should occur.void
setRebalancingEnabled(String cacheName, boolean enabled)
Enables or disables rebalancing for the specified cache
-
-
-
Method Detail
-
handleJoin
CacheStatusResponse handleJoin(String cacheName, Address joiner, CacheJoinInfo joinInfo, int viewId) throws Exception
Signals that a new member is joining the cache. The returnedCacheStatusResponse.cacheTopology
is the current cache topology before the node joined. If the node is the first to join the cache, the returned topology does include the joiner, and it is nevernull
.- Throws:
Exception
-
handleLeave
void handleLeave(String cacheName, Address leaver, int viewId) throws Exception
Signals that a member is leaving the cache.- Throws:
Exception
-
handleRebalancePhaseConfirm
void handleRebalancePhaseConfirm(String cacheName, Address node, int topologyId, Throwable throwable, int viewId) throws Exception
Marks the rebalance as complete on the sender.- Throws:
Exception
-
broadcastRebalanceStart
void broadcastRebalanceStart(String cacheName, CacheTopology cacheTopology, boolean totalOrder, boolean distributed)
-
broadcastTopologyUpdate
void broadcastTopologyUpdate(String cacheName, CacheTopology cacheTopology, AvailabilityMode availabilityMode, boolean totalOrder, boolean distributed)
-
broadcastStableTopologyUpdate
void broadcastStableTopologyUpdate(String cacheName, CacheTopology cacheTopology, boolean totalOrder, boolean distributed)
-
isRebalancingEnabled
boolean isRebalancingEnabled()
-
isRebalancingEnabled
boolean isRebalancingEnabled(String cacheName)
Returns whether rebalancing is enabled or disabled for this container.
-
setRebalancingEnabled
void setRebalancingEnabled(boolean enabled)
Globally enables or disables whether automatic rebalancing should occur.
-
setRebalancingEnabled
void setRebalancingEnabled(String cacheName, boolean enabled)
Enables or disables rebalancing for the specified cache
-
getRebalancingStatus
RebalancingStatus getRebalancingStatus(String cacheName)
Retrieves the rebalancing status of a cache
-
forceRebalance
void forceRebalance(String cacheName)
-
forceAvailabilityMode
void forceAvailabilityMode(String cacheName, AvailabilityMode availabilityMode)
-
handleShutdownRequest
void handleShutdownRequest(String cacheName) throws Exception
- Throws:
Exception
-
broadcastShutdownCache
void broadcastShutdownCache(String cacheName, CacheTopology currentTopology, boolean totalOrder, boolean distributed) throws Exception
- Throws:
Exception
-
setInitialCacheTopologyId
void setInitialCacheTopologyId(String cacheName, int topologyId)
Sets the id of the initial topology in given cache. This is necessary when using entry versions that contain topology id; had we started with topology id 1, newer versions would not be recognized properly.
-
getStatus
ClusterTopologyManager.ClusterManagerStatus getStatus()
-
-