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
ClusterTopologyManager
CacheStatusResponse.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 ClusterTopologyManager
Exception
public void handleLeave(String cacheName, Address leaver, int viewId) throws Exception
ClusterTopologyManager
handleLeave
in interface ClusterTopologyManager
Exception
public void handleRebalanceCompleted(String cacheName, Address node, int topologyId, Throwable throwable, int viewId) throws Exception
ClusterTopologyManager
handleRebalanceCompleted
in interface ClusterTopologyManager
Exception
public void handleClusterView(boolean mergeView, int newViewId)
ClusterTopologyManager
handleClusterView
in interface ClusterTopologyManager
public void broadcastRebalanceStart(String cacheName, CacheTopology cacheTopology, boolean totalOrder, boolean distributed)
broadcastRebalanceStart
in interface ClusterTopologyManager
public void updateCacheMembers(List<Address> newClusterMembers) throws Exception
Exception
public void broadcastTopologyUpdate(String cacheName, CacheTopology cacheTopology, AvailabilityMode availabilityMode, boolean totalOrder, boolean distributed)
broadcastTopologyUpdate
in interface ClusterTopologyManager
public void broadcastStableTopologyUpdate(String cacheName, CacheTopology cacheTopology, boolean totalOrder, boolean distributed)
broadcastStableTopologyUpdate
in interface ClusterTopologyManager
public boolean isRebalancingEnabled()
isRebalancingEnabled
in interface ClusterTopologyManager
public boolean isRebalancingEnabled(String cacheName)
ClusterTopologyManager
isRebalancingEnabled
in interface ClusterTopologyManager
public void setRebalancingEnabled(String cacheName, boolean enabled)
ClusterTopologyManager
setRebalancingEnabled
in interface ClusterTopologyManager
public void setRebalancingEnabled(boolean enabled)
ClusterTopologyManager
setRebalancingEnabled
in interface ClusterTopologyManager
public void forceRebalance(String cacheName)
forceRebalance
in interface ClusterTopologyManager
public void forceAvailabilityMode(String cacheName, AvailabilityMode availabilityMode)
forceAvailabilityMode
in interface ClusterTopologyManager
public RebalancingStatus getRebalancingStatus(String cacheName)
ClusterTopologyManager
getRebalancingStatus
in interface ClusterTopologyManager
Copyright © 2022 JBoss, a division of Red Hat. All rights reserved.