Package org.infinispan.statetransfer
Class StateTransferManagerImpl
- java.lang.Object
-
- org.infinispan.statetransfer.StateTransferManagerImpl
-
- All Implemented Interfaces:
StateTransferManager
public class StateTransferManagerImpl extends java.lang.Object implements StateTransferManager
StateTransferManager
implementation.- Since:
- 5.2
- Author:
- anistor@redhat.com
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
cacheName
-
Constructor Summary
Constructors Constructor Description StateTransferManagerImpl()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map<Address,Response>
forwardCommandIfNeeded(org.infinispan.commands.TopologyAffectedCommand command, java.util.Set<java.lang.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.java.lang.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()
java.lang.String
toString()
void
waitForInitialStateTransferToComplete()
-
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
-
-
-
-
Method Detail
-
start
public void start() throws java.lang.Exception
- Specified by:
start
in interfaceStateTransferManager
- Throws:
java.lang.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()
- Specified by:
waitForInitialStateTransferToComplete
in interfaceStateTransferManager
-
stop
public void stop()
- Specified by:
stop
in interfaceStateTransferManager
-
isJoinComplete
public boolean isJoinComplete()
- Specified by:
isJoinComplete
in interfaceStateTransferManager
-
getRebalancingStatus
public java.lang.String getRebalancingStatus() throws java.lang.Exception
- Specified by:
getRebalancingStatus
in interfaceStateTransferManager
- Throws:
java.lang.Exception
-
isStateTransferInProgress
public boolean isStateTransferInProgress()
Description copied from interface:StateTransferManager
Checks if an inbound state transfer is in progress.- Specified by:
isStateTransferInProgress
in interfaceStateTransferManager
-
forwardCommandIfNeeded
public java.util.Map<Address,Response> forwardCommandIfNeeded(org.infinispan.commands.TopologyAffectedCommand command, java.util.Set<java.lang.Object> affectedKeys, Address origin)
Description copied from interface:StateTransferManager
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.- Specified by:
forwardCommandIfNeeded
in interfaceStateTransferManager
-
getStateConsumer
public StateConsumer getStateConsumer()
- Specified by:
getStateConsumer
in interfaceStateTransferManager
-
getStateProvider
public StateProvider getStateProvider()
- Specified by:
getStateProvider
in interfaceStateTransferManager
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-