org.infinispan.statetransfer
Class DistributedStateTransferTask
java.lang.Object
org.infinispan.statetransfer.BaseStateTransferTask
org.infinispan.statetransfer.DistributedStateTransferTask
public class DistributedStateTransferTask
- extends BaseStateTransferTask
Task which handles view changes (joins, merges or leaves) and rebalances keys using a push based approach.
Essentially, every member gets the old and new consistent hash (CH) on a view change. Then for each key K, it gets
the target servers S-old for the old CH and S-new for the new CH. If S-old == S-new, it does nothing. If there is a
change, it either pushes K to the new location (if it is the owner), or invalidates K (if we're not the owner any
longer).
Example:
- The membership is {A,B,C,D}
- The new view is {A,B,C,D,E,F}
- For K, the old CH is A,B and the new CH is A,C
- A (since it is K's owner) now pushes K to C
- B invalidates K
- For K2, the old CH is A,B and the new CH is B,C
- B (since it is the backup owner and A left) pushes K2 to C
- Since:
- 4.2
- Author:
- Bela Ban, Dan Berindei , Mircea Markus
Fields inherited from class org.infinispan.statetransfer.BaseStateTransferTask |
cacheNotifier, chNew, chOld, configuration, dataContainer, initialView, members, newViewId, self, stateTransferChunkSize, stateTransferLock, trace |
Constructor Summary |
DistributedStateTransferTask(RpcManager rpcManager,
Configuration configuration,
DataContainer dataContainer,
DistributedStateTransferManagerImpl stateTransferManager,
DistributionManager dm,
StateTransferLock stateTransferLock,
CacheNotifier cacheNotifier,
int newViewId,
Collection<Address> members,
ConsistentHash chOld,
ConsistentHash chNew,
boolean initialView,
TransactionTable transactionTable)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DistributedStateTransferTask
public DistributedStateTransferTask(RpcManager rpcManager,
Configuration configuration,
DataContainer dataContainer,
DistributedStateTransferManagerImpl stateTransferManager,
DistributionManager dm,
StateTransferLock stateTransferLock,
CacheNotifier cacheNotifier,
int newViewId,
Collection<Address> members,
ConsistentHash chOld,
ConsistentHash chNew,
boolean initialView,
TransactionTable transactionTable)
doPerformStateTransfer
public void doPerformStateTransfer()
throws Exception
- Specified by:
doPerformStateTransfer
in class BaseStateTransferTask
- Throws:
Exception
commitStateTransfer
public void commitStateTransfer()
- Overrides:
commitStateTransfer
in class BaseStateTransferTask
Copyright © 2012 JBoss, a division of Red Hat. All Rights Reserved.