public class StateConsumerImpl extends Object implements StateConsumer
StateConsumer implementation.| Constructor and Description |
|---|
StateConsumerImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
addUpdatedKey(Object key)
Receive notification of updated keys right before they are committed in DataContainer.
|
void |
applyState(Address sender,
int topologyId,
Collection<StateChunk> stateChunks) |
CacheTopology |
getCacheTopology() |
boolean |
hasActiveTransfers() |
void |
init(Cache cache,
ExecutorService executorService,
StateTransferManager stateTransferManager,
InterceptorChain interceptorChain,
InvocationContextContainer icc,
Configuration configuration,
RpcManager rpcManager,
TransactionManager transactionManager,
CommandsFactory commandsFactory,
PersistenceManager persistenceManager,
DataContainer dataContainer,
TransactionTable transactionTable,
StateTransferLock stateTransferLock,
CacheNotifier cacheNotifier,
TotalOrderManager totalOrderManager,
BlockingTaskAwareExecutorService remoteCommandsExecutor) |
boolean |
isKeyUpdated(Object key)
Checks if a given key was updated by user code during state transfer (and consequently it is untouchable by state transfer).
|
boolean |
isStateTransferInProgress() |
boolean |
isStateTransferInProgressForKey(Object key) |
void |
onTopologyUpdate(CacheTopology cacheTopology,
boolean isRebalance)
Receive notification of topology changes.
|
boolean |
ownsData() |
void |
start() |
void |
stop()
Cancels all incoming state transfers.
|
void |
stopApplyingState()
Stops applying incoming state.
|
public void stopApplyingState()
stopApplyingState in interface StateConsumerpublic void addUpdatedKey(Object key)
addUpdatedKey in interface StateConsumerkey - the key that is being modifiedpublic boolean isKeyUpdated(Object key)
isKeyUpdated in interface StateConsumerkey - the key to checkpublic void init(Cache cache, ExecutorService executorService, StateTransferManager stateTransferManager, InterceptorChain interceptorChain, InvocationContextContainer icc, Configuration configuration, RpcManager rpcManager, TransactionManager transactionManager, CommandsFactory commandsFactory, PersistenceManager persistenceManager, DataContainer dataContainer, TransactionTable transactionTable, StateTransferLock stateTransferLock, CacheNotifier cacheNotifier, TotalOrderManager totalOrderManager, BlockingTaskAwareExecutorService remoteCommandsExecutor)
public boolean hasActiveTransfers()
public boolean isStateTransferInProgress()
isStateTransferInProgress in interface StateConsumerpublic boolean isStateTransferInProgressForKey(Object key)
isStateTransferInProgressForKey in interface StateConsumerpublic boolean ownsData()
ownsData in interface StateConsumerpublic void onTopologyUpdate(CacheTopology cacheTopology, boolean isRebalance)
StateConsumeronTopologyUpdate in interface StateConsumerpublic void applyState(Address sender, int topologyId, Collection<StateChunk> stateChunks)
applyState in interface StateConsumerpublic void start()
public void stop()
StateConsumerstop in interface StateConsumerpublic CacheTopology getCacheTopology()
getCacheTopology in interface StateConsumerCopyright © 2013 JBoss, a division of Red Hat. All rights reserved.