public abstract class BaseStateTransferManagerImpl extends Object implements StateTransferManager, CacheViewListener
| Modifier and Type | Field and Description |
|---|---|
protected CacheLoaderManager |
cacheLoaderManager |
protected CacheNotifier |
cacheNotifier |
protected CommandsFactory |
cf |
protected ConsistentHash |
chNew |
protected ConsistentHash |
chOld |
protected Configuration |
configuration |
protected DataContainer |
dataContainer |
protected InvocationContextContainer |
icc |
protected InterceptorChain |
interceptorChain |
protected RpcManager |
rpcManager |
protected StateTransferLock |
stateTransferLock |
protected TransactionTable |
transactionTable |
| Constructor and Description |
|---|
BaseStateTransferManagerImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
applyLocks(Collection<LockInfo> lockInfo,
Address sender,
int viewId) |
void |
applyState(Collection<InternalCacheEntry> state,
Address sender,
int viewId) |
void |
commitView(int viewId)
Called before committing a cache view.
|
protected abstract ConsistentHash |
createConsistentHash(List<Address> members) |
protected abstract BaseStateTransferTask |
createStateTransferTask(int viewId,
List<Address> members,
boolean initialView) |
protected Address |
getAddress() |
abstract CacheStore |
getCacheStoreForStateTransfer() |
protected abstract long |
getTimeout() |
boolean |
hasJoinStarted() |
void |
init(Configuration configuration,
RpcManager rpcManager,
CommandsFactory cf,
DataContainer dataContainer,
InterceptorChain interceptorChain,
InvocationContextContainer icc,
CacheLoaderManager cacheLoaderManager,
CacheNotifier cacheNotifier,
StateTransferLock stateTransferLock,
CacheViewsManager cacheViewsManager,
TransactionTable transactionTable,
LockContainer<?> lockContainer) |
boolean |
isJoinComplete() |
boolean |
isLastViewId(int viewId) |
boolean |
isStateTransferInProgress() |
void |
postInstallView(int viewId)
Called after the cache view was installed successfully.
|
void |
preInstallView()
Called after a node left or after a merge, even if we're not preparing a new view yet we know we'll prepare one soon.
|
void |
prepareView(CacheView pendingView,
CacheView committedView)
Called after preparing a cache view.
|
void |
pushStateToNode(NotifyingNotifiableFuture<Object> stateTransferFuture,
int viewId,
Collection<Address> targets,
Collection<InternalCacheEntry> state,
Collection<LockInfo> lockInfo) |
void |
rollbackView(int newViewId,
int committedViewId)
Called before rolling back a cache view installation.
|
boolean |
startStateTransfer(int viewId,
Collection<Address> members,
boolean initialView) |
void |
stop() |
void |
waitForJoinToComplete() |
void |
waitForJoinToStart() |
void |
waitForStateTransferToComplete() |
void |
waitForStateTransferToStart(int viewId) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisLocationInDoubtprotected CacheLoaderManager cacheLoaderManager
protected Configuration configuration
protected RpcManager rpcManager
protected CommandsFactory cf
protected DataContainer dataContainer
protected InterceptorChain interceptorChain
protected InvocationContextContainer icc
protected CacheNotifier cacheNotifier
protected StateTransferLock stateTransferLock
protected volatile ConsistentHash chOld
protected volatile ConsistentHash chNew
protected TransactionTable transactionTable
public void init(Configuration configuration, RpcManager rpcManager, CommandsFactory cf, DataContainer dataContainer, InterceptorChain interceptorChain, InvocationContextContainer icc, CacheLoaderManager cacheLoaderManager, CacheNotifier cacheNotifier, StateTransferLock stateTransferLock, CacheViewsManager cacheViewsManager, TransactionTable transactionTable, LockContainer<?> lockContainer)
protected abstract ConsistentHash createConsistentHash(List<Address> members)
public void waitForJoinToComplete()
throws InterruptedException
waitForJoinToComplete in interface StateTransferManagerInterruptedExceptionpublic void stop()
protected Address getAddress()
public boolean hasJoinStarted()
hasJoinStarted in interface StateTransferManagerpublic void waitForJoinToStart()
throws InterruptedException
waitForJoinToStart in interface StateTransferManagerInterruptedExceptionpublic boolean isJoinComplete()
isJoinComplete in interface StateTransferManagerpublic boolean isStateTransferInProgress()
isStateTransferInProgress in interface StateTransferManagerpublic void waitForStateTransferToStart(int viewId)
throws InterruptedException
InterruptedExceptionpublic void waitForStateTransferToComplete()
throws InterruptedException
waitForStateTransferToComplete in interface StateTransferManagerInterruptedExceptionpublic void applyState(Collection<InternalCacheEntry> state, Address sender, int viewId) throws InterruptedException
applyState in interface StateTransferManagerInterruptedExceptionpublic void applyLocks(Collection<LockInfo> lockInfo, Address sender, int viewId) throws InterruptedException
applyLocks in interface StateTransferManagerInterruptedExceptionpublic boolean startStateTransfer(int viewId,
Collection<Address> members,
boolean initialView)
throws TimeoutException,
InterruptedException,
StateTransferCancelledException
true if the state transfer started successfully, false otherwiseTimeoutExceptionInterruptedExceptionStateTransferCancelledExceptionpublic abstract CacheStore getCacheStoreForStateTransfer()
public void pushStateToNode(NotifyingNotifiableFuture<Object> stateTransferFuture, int viewId, Collection<Address> targets, Collection<InternalCacheEntry> state, Collection<LockInfo> lockInfo) throws StateTransferCancelledException
StateTransferCancelledExceptionpublic boolean isLastViewId(int viewId)
public void prepareView(CacheView pendingView, CacheView committedView) throws Exception
CacheViewListenerprepareView in interface CacheViewListenerExceptionpublic void commitView(int viewId)
CacheViewListenercommitView in interface CacheViewListenerpublic void rollbackView(int newViewId,
int committedViewId)
CacheViewListenerrollbackView in interface CacheViewListenerpublic void preInstallView()
CacheViewListenerpreInstallView in interface CacheViewListenerpublic void postInstallView(int viewId)
CacheViewListenerpostInstallView in interface CacheViewListenerprotected abstract BaseStateTransferTask createStateTransferTask(int viewId, List<Address> members, boolean initialView)
protected abstract long getTimeout()
Copyright © 2012 JBoss by Red Hat. All Rights Reserved.