public interface LocalTopologyManager
ClusterTopologyManager
.Modifier and Type | Method and Description |
---|---|
void |
cacheShutdown(String name)
Initiates a cluster-wide cache shutdown for the specified cache
|
void |
confirmRebalancePhase(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) |
CompletionStage<Void> |
handleCacheShutdown(String cacheName)
Handles the local operations related to gracefully shutting down a cache
|
CompletionStage<Void> |
handleRebalance(String cacheName,
CacheTopology cacheTopology,
int viewId,
Address sender)
Performs the state transfer.
|
CompletionStage<Void> |
handleStableTopologyUpdate(String cacheName,
CacheTopology cacheTopology,
Address sender,
int viewId)
Update the stable cache topology.
|
CompletionStage<ManagerStatusResponse> |
handleStatusRequest(int viewId)
Recovers the current topology information for all running caches and returns it to the coordinator.
|
CompletionStage<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.
|
CompletionStage<CacheTopology> |
join(String cacheName,
CacheJoinInfo joinInfo,
CacheTopologyHandler stm,
PartitionHandlingManager phm)
Forwards the join request to the coordinator.
|
void |
leave(String cacheName,
long timeout)
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.
|
CompletionStage<CacheTopology> join(String cacheName, CacheJoinInfo joinInfo, CacheTopologyHandler stm, PartitionHandlingManager phm) throws Exception
Exception
void leave(String cacheName, long timeout)
void confirmRebalancePhase(String cacheName, int topologyId, int rebalanceId, Throwable throwable)
cacheName
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.
cacheName
- the name of the cachetopologyId
- the current topology id of the node at the time the rebalance is completed.rebalanceId
- the id of the current rebalancethrowable
- null
unless local rebalance ended because of an error.CompletionStage<ManagerStatusResponse> handleStatusRequest(int viewId)
viewId
- The coordinator's view idCompletionStage<Void> handleTopologyUpdate(String cacheName, CacheTopology cacheTopology, AvailabilityMode availabilityMode, int viewId, Address sender)
CompletionStage<Void> handleStableTopologyUpdate(String cacheName, CacheTopology cacheTopology, Address sender, int viewId)
Mostly needed for backup, so that a new coordinator can recover the stable topology of the cluster.
CompletionStage<Void> handleRebalance(String cacheName, CacheTopology cacheTopology, int viewId, Address sender)
CacheTopology getCacheTopology(String cacheName)
CacheTopology getStableCacheTopology(String cacheName)
boolean isRebalancingEnabled() throws Exception
Exception
boolean isCacheRebalancingEnabled(String cacheName) throws Exception
Exception
void setRebalancingEnabled(boolean enabled) throws Exception
Exception
void setCacheRebalancingEnabled(String cacheName, boolean enabled) throws Exception
Exception
RebalancingStatus getRebalancingStatus(String cacheName) throws Exception
Exception
AvailabilityMode getCacheAvailability(String cacheName)
void setCacheAvailability(String cacheName, AvailabilityMode availabilityMode) throws Exception
Exception
PersistentUUID getPersistentUUID()
void cacheShutdown(String name)
CompletionStage<Void> handleCacheShutdown(String cacheName)
Copyright © 2021 JBoss by Red Hat. All rights reserved.