public class ClusterTopologyManagerImpl extends Object implements ClusterTopologyManager
ClusterTopologyManager implementation.| Modifier and Type | Class and Description |
|---|---|
class |
ClusterTopologyManagerImpl.ClusterViewListener |
ClusterTopologyManager.ClusterManagerStatus| Modifier and Type | Field and Description |
|---|---|
static int |
CLUSTER_RECOVERY_ATTEMPTS |
static int |
INITIAL_CONNECTION_ATTEMPTS |
| Constructor and Description |
|---|
ClusterTopologyManagerImpl() |
| Modifier and Type | Method and Description |
|---|---|
CompletionStage<Void> |
broadcastShutdownCache(String cacheName) |
static boolean |
distLostDataCheck(ConsistentHash stableCH,
List<Address> newMembers) |
CompletionStage<Void> |
forceAvailabilityMode(String cacheName,
AvailabilityMode availabilityMode) |
CompletionStage<Void> |
forceRebalance(String cacheName) |
RebalancingStatus |
getRebalancingStatus(String cacheName)
Retrieves the rebalancing status of a cache
|
ClusterTopologyManager.ClusterManagerStatus |
getStatus() |
CompletionStage<CacheStatusResponse> |
handleJoin(String cacheName,
Address joiner,
CacheJoinInfo joinInfo,
int joinerViewId)
Signals that a new member is joining the cache.
|
CompletionStage<Void> |
handleLeave(String cacheName,
Address leaver,
int viewId)
Signals that a member is leaving the cache.
|
CompletionStage<Void> |
handleRebalancePhaseConfirm(String cacheName,
Address node,
int topologyId,
Throwable throwable,
int viewId)
Marks the rebalance as complete on the sender.
|
CompletionStage<Void> |
handleShutdownRequest(String cacheName) |
boolean |
isRebalancingEnabled() |
boolean |
isRebalancingEnabled(String cacheName)
Returns whether rebalancing is enabled or disabled for this container.
|
static boolean |
scatteredLostDataCheck(ConsistentHash stableCH,
List<Address> newMembers) |
void |
setInitialCacheTopologyId(String cacheName,
int topologyId)
Sets the id of the initial topology in given cache.
|
CompletionStage<Void> |
setRebalancingEnabled(boolean enabled)
Globally enables or disables whether automatic rebalancing should occur.
|
CompletionStage<Void> |
setRebalancingEnabled(String cacheName,
boolean enabled)
Enables or disables rebalancing for the specified cache
|
void |
start() |
void |
stop() |
public static final int INITIAL_CONNECTION_ATTEMPTS
public static final int CLUSTER_RECOVERY_ATTEMPTS
public void start()
public void stop()
public ClusterTopologyManager.ClusterManagerStatus getStatus()
getStatus in interface ClusterTopologyManagerpublic CompletionStage<CacheStatusResponse> handleJoin(String cacheName, Address joiner, CacheJoinInfo joinInfo, int joinerViewId)
ClusterTopologyManagerCacheStatusResponse.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 never null.handleJoin in interface ClusterTopologyManagerpublic CompletionStage<Void> handleLeave(String cacheName, Address leaver, int viewId) throws Exception
ClusterTopologyManagerhandleLeave in interface ClusterTopologyManagerExceptionpublic CompletionStage<Void> handleRebalancePhaseConfirm(String cacheName, Address node, int topologyId, Throwable throwable, int viewId) throws Exception
ClusterTopologyManagerhandleRebalancePhaseConfirm in interface ClusterTopologyManagerExceptionpublic boolean isRebalancingEnabled()
isRebalancingEnabled in interface ClusterTopologyManagerpublic boolean isRebalancingEnabled(String cacheName)
ClusterTopologyManagerisRebalancingEnabled in interface ClusterTopologyManagerpublic CompletionStage<Void> setRebalancingEnabled(String cacheName, boolean enabled)
ClusterTopologyManagersetRebalancingEnabled in interface ClusterTopologyManagerpublic CompletionStage<Void> setRebalancingEnabled(boolean enabled)
ClusterTopologyManagersetRebalancingEnabled in interface ClusterTopologyManagerpublic CompletionStage<Void> forceRebalance(String cacheName)
forceRebalance in interface ClusterTopologyManagerpublic CompletionStage<Void> forceAvailabilityMode(String cacheName, AvailabilityMode availabilityMode)
forceAvailabilityMode in interface ClusterTopologyManagerpublic RebalancingStatus getRebalancingStatus(String cacheName)
ClusterTopologyManagergetRebalancingStatus in interface ClusterTopologyManagerpublic CompletionStage<Void> broadcastShutdownCache(String cacheName)
public void setInitialCacheTopologyId(String cacheName, int topologyId)
ClusterTopologyManagersetInitialCacheTopologyId in interface ClusterTopologyManagerpublic CompletionStage<Void> handleShutdownRequest(String cacheName) throws Exception
handleShutdownRequest in interface ClusterTopologyManagerExceptionpublic static boolean scatteredLostDataCheck(ConsistentHash stableCH, List<Address> newMembers)
public static boolean distLostDataCheck(ConsistentHash stableCH, List<Address> newMembers)
Copyright © 2022 JBoss by Red Hat. All rights reserved.