@MBean(objectName="StateTransferManager", description="Component that handles state transfer") 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.
|
String |
getRebalancingStatus() |
StateConsumer |
getStateConsumer() |
StateProvider |
getStateProvider() |
boolean |
isJoinComplete() |
boolean |
isStateTransferInProgress()
Checks if an inbound state transfer is in progress.
|
static ConsistentHashFactory |
pickConsistentHashFactory(GlobalConfiguration globalConfiguration,
Configuration configuration)
If no ConsistentHashFactory was explicitly configured we choose a suitable one based on cache mode.
|
void |
start() |
void |
stop() |
String |
toString() |
void |
waitForInitialStateTransferToComplete()
Wait for the local cache to receive initial state from the other members.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
isStateTransferInProgressForKey
protected String cacheName
public void start() throws Exception
start
in interface StateTransferManager
Exception
public static ConsistentHashFactory pickConsistentHashFactory(GlobalConfiguration globalConfiguration, Configuration configuration)
public void waitForInitialStateTransferToComplete()
StateTransferManager
Does nothing if StateTransferConfiguration.awaitInitialTransfer()
is disabled.
waitForInitialStateTransferToComplete
in interface StateTransferManager
public void stop()
stop
in interface StateTransferManager
@ManagedAttribute(description="If true, the node has successfully joined the grid and is considered to hold state. If false, the join process is still in progress.", displayName="Is join completed?", dataType=TRAIT) public boolean isJoinComplete()
isJoinComplete
in interface StateTransferManager
@ManagedAttribute(description="Retrieves the rebalancing status for this cache. Possible values are PENDING, SUSPENDED, IN_PROGRESS, BALANCED", displayName="Rebalancing progress", dataType=TRAIT) public String getRebalancingStatus() throws Exception
getRebalancingStatus
in interface StateTransferManager
Exception
@ManagedAttribute(description="Checks whether there is a pending inbound state transfer on this cluster member.", displayName="Is state transfer in progress?", dataType=TRAIT) public boolean isStateTransferInProgress()
StateTransferManager
isStateTransferInProgress
in interface StateTransferManager
public Map<Address,Response> forwardCommandIfNeeded(TopologyAffectedCommand command, Set<Object> affectedKeys, Address origin)
StateTransferManager
forwardCommandIfNeeded
in interface StateTransferManager
public StateConsumer getStateConsumer()
getStateConsumer
in interface StateTransferManager
public StateProvider getStateProvider()
getStateProvider
in interface StateTransferManager
Copyright © 2021 JBoss by Red Hat. All rights reserved.