Package org.infinispan.statetransfer
Class StateTransferManagerImpl
- java.lang.Object
-
- org.infinispan.statetransfer.StateTransferManagerImpl
-
- All Implemented Interfaces:
StateTransferManager
@MBean(objectName="StateTransferManager", description="Component that handles state transfer") public class StateTransferManagerImpl extends Object implements StateTransferManagerStateTransferManagerimplementation.- Since:
- 5.2
- Author:
- anistor@redhat.com
-
-
Constructor Summary
Constructors Constructor Description StateTransferManagerImpl()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method 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.StringgetRebalancingStatus()StateConsumergetStateConsumer()StateProvidergetStateProvider()booleanisJoinComplete()booleanisStateTransferInProgress()Checks if an inbound state transfer is in progress.static ConsistentHashFactorypickConsistentHashFactory(GlobalConfiguration globalConfiguration, Configuration configuration)If no ConsistentHashFactory was explicitly configured we choose a suitable one based on cache mode.voidstart()voidstop()StringtoString()voidwaitForInitialStateTransferToComplete()Wait for the local cache to receive initial state from the other members.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.infinispan.statetransfer.StateTransferManager
isStateTransferInProgressForKey
-
-
-
-
Field Detail
-
cacheName
protected String cacheName
-
-
Method Detail
-
start
public void start() throws Exception- Specified by:
startin interfaceStateTransferManager- Throws:
Exception
-
pickConsistentHashFactory
public static ConsistentHashFactory pickConsistentHashFactory(GlobalConfiguration globalConfiguration, Configuration configuration)
If no ConsistentHashFactory was explicitly configured we choose a suitable one based on cache mode.
-
waitForInitialStateTransferToComplete
public void waitForInitialStateTransferToComplete()
Description copied from interface:StateTransferManagerWait for the local cache to receive initial state from the other members.Does nothing if
StateTransferConfiguration.awaitInitialTransfer()is disabled.- Specified by:
waitForInitialStateTransferToCompletein interfaceStateTransferManager
-
stop
public void stop()
- Specified by:
stopin interfaceStateTransferManager
-
isJoinComplete
@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()- Specified by:
isJoinCompletein interfaceStateTransferManager
-
getRebalancingStatus
@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- Specified by:
getRebalancingStatusin interfaceStateTransferManager- Throws:
Exception
-
isStateTransferInProgress
@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()Description copied from interface:StateTransferManagerChecks if an inbound state transfer is in progress.- Specified by:
isStateTransferInProgressin interfaceStateTransferManager
-
forwardCommandIfNeeded
public Map<Address,Response> forwardCommandIfNeeded(TopologyAffectedCommand command, Set<Object> affectedKeys, Address origin)
Description copied from interface:StateTransferManagerIf 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.- Specified by:
forwardCommandIfNeededin interfaceStateTransferManager
-
getStateConsumer
public StateConsumer getStateConsumer()
- Specified by:
getStateConsumerin interfaceStateTransferManager
-
getStateProvider
public StateProvider getStateProvider()
- Specified by:
getStateProviderin interfaceStateTransferManager
-
-