public abstract class AbstractControlledLocalTopologyManager extends Object implements LocalTopologyManager
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractControlledLocalTopologyManager(LocalTopologyManager delegate) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
beforeConfirmRebalance(String cacheName,
int topologyId,
Throwable throwable) |
protected void |
beforeHandleRebalance(String cacheName,
CacheTopology cacheTopology,
int viewId) |
protected void |
beforeHandleTopologyUpdate(String cacheName,
CacheTopology cacheTopology,
int viewId) |
void |
confirmRebalance(String cacheName,
int topologyId,
int rebalanceId,
Throwable throwable)
Confirm that the local cache
cacheName has finished receiving the new data for topology
topologyId. |
AvailabilityMode |
getCacheAvailability(String cacheName)
Retrieves the availability state of a cache.
|
CacheTopology |
getCacheTopology(String cacheName) |
PersistentUUID |
getPersistentUUID()
Returns the local UUID of this node.
|
RebalancingStatus |
getRebalancingStatus(String cacheName)
Retrieve the rebalancing status for the specified cache
|
CacheTopology |
getStableCacheTopology(String cacheName) |
void |
handleRebalance(String cacheName,
CacheTopology cacheTopology,
int viewId,
Address sender)
Performs the state transfer.
|
void |
handleStableTopologyUpdate(String cacheName,
CacheTopology cacheTopology,
Address sender,
int viewId)
Update the stable cache topology.
|
ManagerStatusResponse |
handleStatusRequest(int viewId)
Recovers the current topology information for all running caches and returns it to the coordinator.
|
void |
handleTopologyUpdate(String cacheName,
CacheTopology cacheTopology,
AvailabilityMode availabilityMode,
int viewId,
Address sender)
Updates the current and/or pending consistent hash, without transferring any state.
|
boolean |
isCacheRebalancingEnabled(String cacheName)
Checks whether rebalancing is enabled for the specified cache.
|
boolean |
isRebalancingEnabled()
Checks whether rebalancing is enabled for the entire cluster.
|
boolean |
isTotalOrderCache(String cacheName)
Checks if the cache defined by
cacheName is using total order. |
CacheTopology |
join(String cacheName,
CacheJoinInfo joinInfo,
CacheTopologyHandler stm,
PartitionHandlingManager phm)
Forwards the join request to the coordinator.
|
void |
leave(String cacheName)
Forwards the leave request to the coordinator.
|
void |
setCacheAvailability(String cacheName,
AvailabilityMode availabilityMode)
Updates the availability state of a cache (for the entire cluster).
|
void |
setCacheRebalancingEnabled(String cacheName,
boolean enabled)
Enable or disable rebalancing for the specified cache.
|
void |
setRebalancingEnabled(boolean enabled)
Enable or disable rebalancing in the entire cluster.
|
void |
startDelegate() |
void |
stopDelegate() |
protected AbstractControlledLocalTopologyManager(LocalTopologyManager delegate)
public final CacheTopology join(String cacheName, CacheJoinInfo joinInfo, CacheTopologyHandler stm, PartitionHandlingManager phm) throws Exception
LocalTopologyManagerjoin in interface LocalTopologyManagerExceptionpublic final void leave(String cacheName)
LocalTopologyManagerleave in interface LocalTopologyManagerpublic final void confirmRebalance(String cacheName, int topologyId, int rebalanceId, Throwable throwable)
LocalTopologyManagercacheName has finished receiving the new data for topology
topologyId.
The coordinator can change during the state transfer, so we make the rebalance RPC async and we send the response as a different command.
confirmRebalance in interface LocalTopologyManagercacheName - the name of the cachetopologyId - the current topology id of the node at the time the rebalance is completed. This must be >= than the one when rebalance starts.throwable - null unless local rebalance ended because of an error.public final ManagerStatusResponse handleStatusRequest(int viewId)
LocalTopologyManagerhandleStatusRequest in interface LocalTopologyManagerpublic final void handleTopologyUpdate(String cacheName, CacheTopology cacheTopology, AvailabilityMode availabilityMode, int viewId, Address sender) throws InterruptedException
LocalTopologyManagerhandleTopologyUpdate in interface LocalTopologyManagerInterruptedExceptionpublic final void handleRebalance(String cacheName, CacheTopology cacheTopology, int viewId, Address sender) throws InterruptedException
LocalTopologyManagerhandleRebalance in interface LocalTopologyManagerInterruptedExceptionpublic final CacheTopology getCacheTopology(String cacheName)
getCacheTopology in interface LocalTopologyManagerpublic void handleStableTopologyUpdate(String cacheName, CacheTopology cacheTopology, Address sender, int viewId)
LocalTopologyManagerhandleStableTopologyUpdate in interface LocalTopologyManagerpublic CacheTopology getStableCacheTopology(String cacheName)
getStableCacheTopology in interface LocalTopologyManagerpublic boolean isRebalancingEnabled()
throws Exception
LocalTopologyManagerisRebalancingEnabled in interface LocalTopologyManagerExceptionpublic void setRebalancingEnabled(boolean enabled)
throws Exception
LocalTopologyManagersetRebalancingEnabled in interface LocalTopologyManagerExceptionpublic boolean isCacheRebalancingEnabled(String cacheName) throws Exception
LocalTopologyManagerisCacheRebalancingEnabled in interface LocalTopologyManagerExceptionpublic void setCacheRebalancingEnabled(String cacheName, boolean enabled) throws Exception
LocalTopologyManagersetCacheRebalancingEnabled in interface LocalTopologyManagerExceptionpublic RebalancingStatus getRebalancingStatus(String cacheName) throws Exception
LocalTopologyManagergetRebalancingStatus in interface LocalTopologyManagerExceptionpublic AvailabilityMode getCacheAvailability(String cacheName)
LocalTopologyManagergetCacheAvailability in interface LocalTopologyManagerpublic void setCacheAvailability(String cacheName, AvailabilityMode availabilityMode) throws Exception
LocalTopologyManagersetCacheAvailability in interface LocalTopologyManagerExceptionpublic final void startDelegate()
public final void stopDelegate()
public boolean isTotalOrderCache(String cacheName)
LocalTopologyManagercacheName is using total order.
If this component is not running or the cacheName is not defined, it returns false.isTotalOrderCache in interface LocalTopologyManagertrue if the cache is using the total order protocol, false otherwise.protected void beforeHandleTopologyUpdate(String cacheName, CacheTopology cacheTopology, int viewId)
protected void beforeHandleRebalance(String cacheName, CacheTopology cacheTopology, int viewId)
protected void beforeConfirmRebalance(String cacheName, int topologyId, Throwable throwable)
public PersistentUUID getPersistentUUID()
LocalTopologyManagergetPersistentUUID in interface LocalTopologyManagerCopyright © 2024 JBoss, a division of Red Hat. All rights reserved.