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 |
beforeHandleConsistentHashUpdate(String cacheName,
CacheTopology cacheTopology,
int viewId) |
protected void |
beforeHandleRebalance(String cacheName,
CacheTopology cacheTopology,
int viewId) |
void |
confirmRebalance(String cacheName,
int topologyId,
Throwable throwable)
Confirm that the local cache
cacheName has finished receiving the new data for topology
topologyId. |
CacheTopology |
getCacheTopology(String cacheName) |
void |
handleConsistentHashUpdate(String cacheName,
CacheTopology cacheTopology,
int viewId)
Updates the current and/or pending consistent hash, without transferring any state.
|
void |
handleRebalance(String cacheName,
CacheTopology cacheTopology,
int viewId)
Performs the state transfer.
|
Map<String,Object[]> |
handleStatusRequest(int viewId)
Recovers the current topology information for all running caches and returns it to the coordinator.
|
CacheTopology |
join(String cacheName,
CacheJoinInfo joinInfo,
CacheTopologyHandler stm)
Forwards the join request to the coordinator.
|
void |
leave(String cacheName)
Forwards the leave request to the coordinator.
|
void |
startDelegate() |
void |
stopDelegate() |
protected AbstractControlledLocalTopologyManager(LocalTopologyManager delegate)
public final CacheTopology join(String cacheName, CacheJoinInfo joinInfo, CacheTopologyHandler stm) throws Exception
LocalTopologyManagerjoin in interface LocalTopologyManagerExceptionpublic final void leave(String cacheName)
LocalTopologyManagerleave in interface LocalTopologyManagerpublic final void confirmRebalance(String cacheName, int topologyId, 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 Map<String,Object[]> handleStatusRequest(int viewId)
LocalTopologyManagerhandleStatusRequest in interface LocalTopologyManagerpublic final void handleConsistentHashUpdate(String cacheName, CacheTopology cacheTopology, int viewId) throws InterruptedException
LocalTopologyManagerhandleConsistentHashUpdate in interface LocalTopologyManagerInterruptedExceptionpublic final void handleRebalance(String cacheName, CacheTopology cacheTopology, int viewId) throws InterruptedException
LocalTopologyManagerhandleRebalance in interface LocalTopologyManagerInterruptedExceptionpublic final CacheTopology getCacheTopology(String cacheName)
getCacheTopology in interface LocalTopologyManagerpublic final void startDelegate()
public final void stopDelegate()
protected void beforeHandleConsistentHashUpdate(String cacheName, CacheTopology cacheTopology, int viewId)
protected void beforeHandleRebalance(String cacheName, CacheTopology cacheTopology, int viewId)
Copyright © 2016 JBoss, a division of Red Hat. All rights reserved.