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, wait
isLocationInDoubt
protected 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 StateTransferManager
InterruptedException
public void stop()
protected Address getAddress()
public boolean hasJoinStarted()
hasJoinStarted
in interface StateTransferManager
public void waitForJoinToStart() throws InterruptedException
waitForJoinToStart
in interface StateTransferManager
InterruptedException
public boolean isJoinComplete()
isJoinComplete
in interface StateTransferManager
public boolean isStateTransferInProgress()
isStateTransferInProgress
in interface StateTransferManager
public void waitForStateTransferToStart(int viewId) throws InterruptedException
InterruptedException
public void waitForStateTransferToComplete() throws InterruptedException
waitForStateTransferToComplete
in interface StateTransferManager
InterruptedException
public void applyState(Collection<InternalCacheEntry> state, Address sender, int viewId) throws InterruptedException
applyState
in interface StateTransferManager
InterruptedException
public void applyLocks(Collection<LockInfo> lockInfo, Address sender, int viewId) throws InterruptedException
applyLocks
in interface StateTransferManager
InterruptedException
public boolean startStateTransfer(int viewId, Collection<Address> members, boolean initialView) throws TimeoutException, InterruptedException, StateTransferCancelledException
true
if the state transfer started successfully, false
otherwiseTimeoutException
InterruptedException
StateTransferCancelledException
public abstract CacheStore getCacheStoreForStateTransfer()
public void pushStateToNode(NotifyingNotifiableFuture<Object> stateTransferFuture, int viewId, Collection<Address> targets, Collection<InternalCacheEntry> state, Collection<LockInfo> lockInfo) throws StateTransferCancelledException
StateTransferCancelledException
public boolean isLastViewId(int viewId)
public void prepareView(CacheView pendingView, CacheView committedView) throws Exception
CacheViewListener
prepareView
in interface CacheViewListener
Exception
public void commitView(int viewId)
CacheViewListener
commitView
in interface CacheViewListener
public void rollbackView(int newViewId, int committedViewId)
CacheViewListener
rollbackView
in interface CacheViewListener
public void preInstallView()
CacheViewListener
preInstallView
in interface CacheViewListener
public void postInstallView(int viewId)
CacheViewListener
postInstallView
in interface CacheViewListener
protected abstract BaseStateTransferTask createStateTransferTask(int viewId, List<Address> members, boolean initialView)
protected abstract long getTimeout()
Copyright © 2012 JBoss by Red Hat. All Rights Reserved.