org.infinispan.statetransfer
Class BaseStateTransferTask

java.lang.Object
  extended by org.infinispan.statetransfer.BaseStateTransferTask
Direct Known Subclasses:
DistributedStateTransferTask, ReplicatedStateTransferTask

public abstract class BaseStateTransferTask
extends Object

Push state from the existing members of the cluster to the new members. This is a base class, extended by the distributed an replicated versions.


Field Summary
protected  CacheNotifier cacheNotifier
           
protected  ConsistentHash chNew
           
protected  ConsistentHash chOld
           
protected  Configuration configuration
           
protected  DataContainer dataContainer
           
protected  boolean initialView
           
protected  Collection<Address> members
           
protected  int newViewId
           
protected  Address self
           
protected  int stateTransferChunkSize
           
protected  StateTransferLock stateTransferLock
           
protected  BaseStateTransferManagerImpl stateTransferManager
           
protected  boolean trace
           
 
Constructor Summary
BaseStateTransferTask(BaseStateTransferManagerImpl stateTransferManager, RpcManager rpcManager, StateTransferLock stateTransferLock, CacheNotifier cacheNotifier, Configuration configuration, DataContainer dataContainer, Collection<Address> members, int newViewId, ConsistentHash chNew, ConsistentHash chOld, boolean initialView)
           
 
Method Summary
 void cancelStateTransfer(boolean sync)
           
protected  void checkIfCancelled()
           
 void commitStateTransfer()
           
abstract  void doPerformStateTransfer()
           
protected  void finishPushingState()
           
 void performStateTransfer()
           
protected  void pushPartialState(Collection<Address> targets, Collection<InternalCacheEntry> state, Collection<LockInfo> lockInfo)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

configuration

protected final Configuration configuration

stateTransferManager

protected final BaseStateTransferManagerImpl stateTransferManager

stateTransferLock

protected final StateTransferLock stateTransferLock

cacheNotifier

protected final CacheNotifier cacheNotifier

newViewId

protected final int newViewId

dataContainer

protected final DataContainer dataContainer

self

protected final Address self

trace

protected final boolean trace

members

protected final Collection<Address> members

chOld

protected final ConsistentHash chOld

chNew

protected final ConsistentHash chNew

initialView

protected final boolean initialView

stateTransferChunkSize

protected int stateTransferChunkSize
Constructor Detail

BaseStateTransferTask

public BaseStateTransferTask(BaseStateTransferManagerImpl stateTransferManager,
                             RpcManager rpcManager,
                             StateTransferLock stateTransferLock,
                             CacheNotifier cacheNotifier,
                             Configuration configuration,
                             DataContainer dataContainer,
                             Collection<Address> members,
                             int newViewId,
                             ConsistentHash chNew,
                             ConsistentHash chOld,
                             boolean initialView)
Method Detail

performStateTransfer

public void performStateTransfer()
                          throws Exception
Throws:
Exception

doPerformStateTransfer

public abstract void doPerformStateTransfer()
                                     throws Exception
Throws:
Exception

commitStateTransfer

public void commitStateTransfer()

cancelStateTransfer

public void cancelStateTransfer(boolean sync)

finishPushingState

protected void finishPushingState()
                           throws InterruptedException,
                                  ExecutionException,
                                  TimeoutException
Throws:
InterruptedException
ExecutionException
TimeoutException

pushPartialState

protected void pushPartialState(Collection<Address> targets,
                                Collection<InternalCacheEntry> state,
                                Collection<LockInfo> lockInfo)
                         throws StateTransferCancelledException
Throws:
StateTransferCancelledException

checkIfCancelled

protected void checkIfCancelled()
                         throws StateTransferCancelledException
Throws:
StateTransferCancelledException

-->

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