Infinispan Distribution 5.2.6.Final-redhat-2

org.infinispan.statetransfer
Class StateTransferManagerImpl

java.lang.Object
  extended by org.infinispan.statetransfer.StateTransferManagerImpl
All Implemented Interfaces:
StateTransferManager

public class StateTransferManagerImpl
extends Object
implements StateTransferManager

StateTransferManager implementation.

Since:
5.2
Author:
anistor@redhat.com

Constructor Summary
StateTransferManagerImpl()
           
 
Method Summary
 void forwardCommandIfNeeded(TopologyAffectedCommand command, Set<Object> affectedKeys, Address origin, boolean sync)
          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()
           
 void init(StateConsumer stateConsumer, StateProvider stateProvider, Cache cache, CacheNotifier cacheNotifier, Configuration configuration, GlobalConfiguration globalConfiguration, RpcManager rpcManager, GroupManager groupManager, LocalTopologyManager localTopologyManager)
           
 boolean isJoinComplete()
           
 boolean isLocalNodeFirst()
           
 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 notifyEndOfTopologyUpdate(int topologyId)
           
 void start()
           
 void stop()
           
 void waitForInitialStateTransferToComplete()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StateTransferManagerImpl

public StateTransferManagerImpl()
Method Detail

init

public void init(StateConsumer stateConsumer,
                 StateProvider stateProvider,
                 Cache cache,
                 CacheNotifier cacheNotifier,
                 Configuration configuration,
                 GlobalConfiguration globalConfiguration,
                 RpcManager rpcManager,
                 GroupManager groupManager,
                 LocalTopologyManager localTopologyManager)

start

public void start()
           throws Exception
Specified by:
start in interface StateTransferManager
Throws:
Exception

waitForInitialStateTransferToComplete

public void waitForInitialStateTransferToComplete()
                                           throws InterruptedException
Throws:
InterruptedException

stop

public void stop()
Specified by:
stop in interface StateTransferManager

isJoinComplete

public boolean isJoinComplete()
Specified by:
isJoinComplete in interface StateTransferManager

isStateTransferInProgress

public boolean isStateTransferInProgress()
Description copied from interface: StateTransferManager
Checks if an inbound state transfer is in progress.

Specified by:
isStateTransferInProgress in interface StateTransferManager

isStateTransferInProgressForKey

public boolean isStateTransferInProgressForKey(Object key)
Description copied from interface: StateTransferManager
Checks if an inbound state transfer is in progress for a given key.

Specified by:
isStateTransferInProgressForKey in interface StateTransferManager
Returns:

getCacheTopology

public CacheTopology getCacheTopology()
Specified by:
getCacheTopology in interface StateTransferManager

isLocalNodeFirst

public boolean isLocalNodeFirst()
Specified by:
isLocalNodeFirst in interface StateTransferManager
Returns:
true if the local node was the first to start this cache in the cluster.

forwardCommandIfNeeded

public void forwardCommandIfNeeded(TopologyAffectedCommand command,
                                   Set<Object> affectedKeys,
                                   Address origin,
                                   boolean sync)
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 interface StateTransferManager

notifyEndOfTopologyUpdate

public void notifyEndOfTopologyUpdate(int topologyId)
Specified by:
notifyEndOfTopologyUpdate in interface StateTransferManager

Infinispan Distribution 5.2.6.Final-redhat-2

Copyright © 2013 JBoss, a division of Red Hat. All Rights Reserved.