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 -
Method Summary
Modifier and TypeMethodDescriptioncurrentJoiners
(String cacheName) Returns the list of nodes that joined the cache with the givencacheName
if the current node is the coordinator.forceAvailabilityMode
(String cacheName, AvailabilityMode availabilityMode) forceRebalance
(String cacheName) getAvailabilityMode
(String cacheName) Retrieves the current availability mode of a cache.getRebalancingStatus
(String cacheName) Retrieves the rebalancing status of a cachehandleJoin
(String cacheName, Address joiner, CacheJoinInfo joinInfo, int viewId) Signals that a new member is joining the cache.handleLeave
(String cacheName, Address leaver) Signals that a member is leaving the cache.default CompletionStage
<Void> handleLeave
(String cacheName, Address leaver, int viewId) Deprecated, for removal: This API element is subject to removal in a future version.handleRebalancePhaseConfirm
(String cacheName, Address node, int topologyId, Throwable throwable) default CompletionStage
<Void> handleRebalancePhaseConfirm
(String cacheName, Address node, int topologyId, Throwable throwable, int viewId) Deprecated, for removal: This API element is subject to removal in a future version.since 16.0, usehandleRebalancePhaseConfirm(String, Address, int, Throwable)
insteadhandleShutdownRequest
(String cacheName) boolean
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.setRebalancingEnabled
(boolean enabled) Globally enables or disables whether automatic rebalancing should occur.setRebalancingEnabled
(String cacheName, boolean enabled) Enables or disables rebalancing for the specified cacheboolean
useCurrentTopologyAsStable
(String cacheName, boolean force)
-
Method Details
-
currentJoiners
-
handleJoin
CompletionStage<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
@Deprecated(since="16.0", forRemoval=true) default CompletionStage<Void> handleLeave(String cacheName, Address leaver, int viewId) throws Exception Deprecated, for removal: This API element is subject to removal in a future version.since 16.0, usehandleLeave(String, Address)
insteadSignals that a member is leaving the cache.- Parameters:
viewId
- is always ignored- Throws:
Exception
-
handleLeave
-
handleRebalancePhaseConfirm
@Deprecated(since="16.0", forRemoval=true) default CompletionStage<Void> handleRebalancePhaseConfirm(String cacheName, Address node, int topologyId, Throwable throwable, int viewId) throws Exception Deprecated, for removal: This API element is subject to removal in a future version.since 16.0, usehandleRebalancePhaseConfirm(String, Address, int, Throwable)
insteadMarks the rebalance as complete on the sender.- Parameters:
viewId
- is always ignored- Throws:
Exception
-
handleRebalancePhaseConfirm
-
isRebalancingEnabled
boolean isRebalancingEnabled() -
isRebalancingEnabled
Returns whether rebalancing is enabled or disabled for this container. -
setRebalancingEnabled
Globally enables or disables whether automatic rebalancing should occur. -
setRebalancingEnabled
Enables or disables rebalancing for the specified cache -
getRebalancingStatus
Retrieves the rebalancing status of a cache -
forceRebalance
-
forceAvailabilityMode
-
getAvailabilityMode
Retrieves the current availability mode of a cache.- Parameters:
cacheName
- Name of the cache to verify.- Returns:
null
if the cache is not found. Otherwise, the current availability status.
-
handleShutdownRequest
- Throws:
Exception
-
useCurrentTopologyAsStable
-
setInitialCacheTopologyId
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()
-
handleLeave(String, Address)
instead