public class StateTransferManagerImpl extends Object implements StateTransferManager
StateTransferManager
implementation.Constructor and Description |
---|
StateTransferManagerImpl() |
Modifier and Type | Method and Description |
---|---|
Map<Address,Response> |
forwardCommandIfNeeded(TopologyAffectedCommand command,
Set<Object> affectedKeys,
Address origin)
If there is an state transfer happening at the moment, this method forwards the supplied
command to the nodes that are new owners of the data, in order to assure consistency.
|
CacheTopology |
getCacheTopology() |
int |
getFirstTopologyAsMember() |
String |
getRebalancingStatus() |
void |
init(StateConsumer stateConsumer,
StateProvider stateProvider,
Cache cache,
CacheNotifier cacheNotifier,
Configuration configuration,
GlobalConfiguration globalConfiguration,
RpcManager rpcManager,
KeyPartitioner keyPartitioner,
LocalTopologyManager localTopologyManager,
PartitionHandlingManager partitionHandlingManager) |
boolean |
isJoinComplete() |
boolean |
isStateTransferInProgress()
Checks if an inbound state transfer is in progress.
|
boolean |
isStateTransferInProgressForKey(Object key)
Checks if an inbound state transfer is in progress for a given key.
|
void |
notifyEndOfRebalance(int topologyId,
int rebalanceId) |
boolean |
ownsData() |
void |
start() |
void |
stop() |
String |
toString() |
void |
waitForInitialStateTransferToComplete() |
public void init(StateConsumer stateConsumer, StateProvider stateProvider, Cache cache, CacheNotifier cacheNotifier, Configuration configuration, GlobalConfiguration globalConfiguration, RpcManager rpcManager, KeyPartitioner keyPartitioner, LocalTopologyManager localTopologyManager, PartitionHandlingManager partitionHandlingManager)
public void start() throws Exception
start
in interface StateTransferManager
Exception
public void waitForInitialStateTransferToComplete() throws Exception
Exception
public void stop()
stop
in interface StateTransferManager
public boolean isJoinComplete()
isJoinComplete
in interface StateTransferManager
public String getRebalancingStatus() throws Exception
getRebalancingStatus
in interface StateTransferManager
Exception
public boolean isStateTransferInProgress()
StateTransferManager
isStateTransferInProgress
in interface StateTransferManager
public boolean isStateTransferInProgressForKey(Object key)
StateTransferManager
isStateTransferInProgressForKey
in interface StateTransferManager
public CacheTopology getCacheTopology()
getCacheTopology
in interface StateTransferManager
public Map<Address,Response> forwardCommandIfNeeded(TopologyAffectedCommand command, Set<Object> affectedKeys, Address origin)
StateTransferManager
forwardCommandIfNeeded
in interface StateTransferManager
public void notifyEndOfRebalance(int topologyId, int rebalanceId)
notifyEndOfRebalance
in interface StateTransferManager
public boolean ownsData()
ownsData
in interface StateTransferManager
public int getFirstTopologyAsMember()
getFirstTopologyAsMember
in interface StateTransferManager
Copyright © 2018 JBoss, a division of Red Hat. All rights reserved.