public class ClusterTopologyManagerImpl extends Object implements ClusterTopologyManager
ClusterTopologyManager implementation.| Modifier and Type | Class and Description |
|---|---|
class |
ClusterTopologyManagerImpl.ClusterViewListener |
| 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 |
|---|---|
void |
broadcastRebalanceStart(String cacheName,
CacheTopology cacheTopology,
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) |
protected void |
fetchRebalancingStatusFromCoordinator() |
void |
forceAvailabilityMode(String cacheName,
AvailabilityMode availabilityMode) |
void |
forceRebalance(String cacheName) |
RebalancingStatus |
getRebalancingStatus(String cacheName)
Retrieves the rebalancing status of a cache
|
void |
handleClusterView(boolean mergeView,
int newViewId)
Install a new cluster view.
|
CacheStatusResponse |
handleJoin(String cacheName,
Address joiner,
CacheJoinInfo joinInfo,
int joinerViewId)
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 |
handleRebalanceCompleted(String cacheName,
Address node,
int topologyId,
Throwable throwable,
int viewId)
Marks the rebalance as complete on the sender.
|
void |
inject(Transport transport,
ExecutorService asyncTransportExecutor,
GlobalConfiguration globalConfiguration,
GlobalComponentRegistry gcr,
CacheManagerNotifier cacheManagerNotifier,
EmbeddedCacheManager cacheManager,
EventLogManager eventLogManager) |
boolean |
isRebalancingEnabled() |
boolean |
isRebalancingEnabled(String cacheName)
Returns whether rebalancing is enabled or disabled for this container.
|
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
|
void |
start() |
void |
stop() |
void |
updateCacheMembers(List<Address> newClusterMembers) |
public static final int INITIAL_CONNECTION_ATTEMPTS
public static final int CLUSTER_RECOVERY_ATTEMPTS
public void inject(Transport transport, ExecutorService asyncTransportExecutor, GlobalConfiguration globalConfiguration, GlobalComponentRegistry gcr, CacheManagerNotifier cacheManagerNotifier, EmbeddedCacheManager cacheManager, EventLogManager eventLogManager)
public void start()
protected void fetchRebalancingStatusFromCoordinator()
public void stop()
public CacheStatusResponse handleJoin(String cacheName, Address joiner, CacheJoinInfo joinInfo, int joinerViewId) throws Exception
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 ClusterTopologyManagerExceptionpublic void handleLeave(String cacheName, Address leaver, int viewId) throws Exception
ClusterTopologyManagerhandleLeave in interface ClusterTopologyManagerExceptionpublic void handleRebalanceCompleted(String cacheName, Address node, int topologyId, Throwable throwable, int viewId) throws Exception
ClusterTopologyManagerhandleRebalanceCompleted in interface ClusterTopologyManagerExceptionpublic void handleClusterView(boolean mergeView,
int newViewId)
ClusterTopologyManagerhandleClusterView in interface ClusterTopologyManagerpublic void broadcastRebalanceStart(String cacheName, CacheTopology cacheTopology, boolean totalOrder, boolean distributed)
broadcastRebalanceStart in interface ClusterTopologyManagerpublic void updateCacheMembers(List<Address> newClusterMembers) throws Exception
Exceptionpublic void broadcastTopologyUpdate(String cacheName, CacheTopology cacheTopology, AvailabilityMode availabilityMode, boolean totalOrder, boolean distributed)
broadcastTopologyUpdate in interface ClusterTopologyManagerpublic void broadcastStableTopologyUpdate(String cacheName, CacheTopology cacheTopology, boolean totalOrder, boolean distributed)
broadcastStableTopologyUpdate in interface ClusterTopologyManagerpublic boolean isRebalancingEnabled()
isRebalancingEnabled in interface ClusterTopologyManagerpublic boolean isRebalancingEnabled(String cacheName)
ClusterTopologyManagerisRebalancingEnabled in interface ClusterTopologyManagerpublic void setRebalancingEnabled(String cacheName, boolean enabled)
ClusterTopologyManagersetRebalancingEnabled in interface ClusterTopologyManagerpublic void setRebalancingEnabled(boolean enabled)
ClusterTopologyManagersetRebalancingEnabled in interface ClusterTopologyManagerpublic void forceRebalance(String cacheName)
forceRebalance in interface ClusterTopologyManagerpublic void forceAvailabilityMode(String cacheName, AvailabilityMode availabilityMode)
forceAvailabilityMode in interface ClusterTopologyManagerpublic RebalancingStatus getRebalancingStatus(String cacheName)
ClusterTopologyManagergetRebalancingStatus in interface ClusterTopologyManagerCopyright © 2024 JBoss, a division of Red Hat. All rights reserved.