@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, waitisStateTransferInProgressForKeyprotected String cacheName
public void start()
throws Exception
start in interface StateTransferManagerExceptionpublic static ConsistentHashFactory pickConsistentHashFactory(GlobalConfiguration globalConfiguration, Configuration configuration)
public void waitForInitialStateTransferToComplete()
StateTransferManagerDoes nothing if StateTransferConfiguration.awaitInitialTransfer() is disabled.
waitForInitialStateTransferToComplete in interface StateTransferManagerpublic 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 StateTransferManagerException@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()
StateTransferManagerisStateTransferInProgress in interface StateTransferManagerpublic Map<Address,Response> forwardCommandIfNeeded(TopologyAffectedCommand command, Set<Object> affectedKeys, Address origin)
StateTransferManagerforwardCommandIfNeeded in interface StateTransferManagerpublic StateConsumer getStateConsumer()
getStateConsumer in interface StateTransferManagerpublic StateProvider getStateProvider()
getStateProvider in interface StateTransferManagerCopyright © 2022 JBoss by Red Hat. All rights reserved.