|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.infinispan.distribution.DistributionManagerImpl
public class DistributionManagerImpl
The default distribution manager implementation
Nested Class Summary | |
---|---|
class |
DistributionManagerImpl.ViewChangeListener
|
Constructor Summary | |
---|---|
DistributionManagerImpl()
|
Method Summary | |
---|---|
void |
applyReceivedState(Map<Object,InternalCacheValue> state)
|
void |
applyState(ConsistentHash consistentHash,
Map<Object,InternalCacheValue> state)
|
CacheStore |
getCacheStoreForRehashing()
Retrieves a cache store if one is available and set up for use in rehashing. |
String |
getClusterSize()
|
ConsistentHash |
getConsistentHash()
|
TransactionLogger |
getTransactionLogger()
|
void |
informRehashOnJoin(Address joiner,
boolean starting)
This will cause all nodes to add the joiner to their UnionCH |
void |
init(Configuration configuration,
RpcManager rpcManager,
CacheManagerNotifier notifier,
CommandsFactory cf,
DataContainer dataContainer,
InterceptorChain interceptorChain,
InvocationContextContainer icc,
CacheLoaderManager cacheLoaderManager)
|
boolean |
isAffectedByRehash(Object key)
Tests whether a given key is affected by a rehash that may be in progress. |
boolean |
isLocal(Object key)
|
boolean |
isLocatedLocally(String key)
|
boolean |
isRehashInProgress()
|
List<Address> |
locate(Object key)
Locates a key in a cluster. |
Map<Object,List<Address>> |
locateAll(Collection<Object> keys)
Locates a list of keys in a cluster. |
List<String> |
locateKey(String key)
|
void |
notifyJoinComplete(Address joiner)
Notifies a coordinator when a join completes |
void |
rehash(List<Address> newMembers,
List<Address> oldMembers)
|
List<Address> |
requestPermissionToJoin(Address joiner)
"Asks" a coordinator if a joiner may join. |
InternalCacheEntry |
retrieveFromRemoteSource(Object key)
Retrieves a cache entry from a remote source |
void |
setConsistentHash(ConsistentHash consistentHash)
|
void |
start()
|
void |
stop()
|
void |
transformForL1(CacheEntry entry)
Transforms a cache entry so it is marked for L1 rather than the primary cache data structure. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DistributionManagerImpl()
Method Detail |
---|
public void init(Configuration configuration, RpcManager rpcManager, CacheManagerNotifier notifier, CommandsFactory cf, DataContainer dataContainer, InterceptorChain interceptorChain, InvocationContextContainer icc, CacheLoaderManager cacheLoaderManager)
public void start() throws Exception
Exception
public void stop()
public void rehash(List<Address> newMembers, List<Address> oldMembers)
public boolean isLocal(Object key)
isLocal
in interface DistributionManager
public List<Address> locate(Object key)
DistributionManager
locate
in interface DistributionManager
key
- key to test
public Map<Object,List<Address>> locateAll(Collection<Object> keys)
DistributionManager
DistributionManager.locate(Object)
the returned addresses may not be owners
of the keys if a rehash happens to be in progress or is pending, so when querying these servers, invalid responses
should be checked for and the next address checked accordingly.
locateAll
in interface DistributionManager
keys
- list of keys to test
public void transformForL1(CacheEntry entry)
DistributionManager
transformForL1
in interface DistributionManager
entry
- entry to transformpublic InternalCacheEntry retrieveFromRemoteSource(Object key) throws Exception
DistributionManager
retrieveFromRemoteSource
in interface DistributionManager
key
- key to look up
Exception
public ConsistentHash getConsistentHash()
getConsistentHash
in interface DistributionManager
public void setConsistentHash(ConsistentHash consistentHash)
setConsistentHash
in interface DistributionManager
public boolean isAffectedByRehash(Object key)
DistributionManager
isAffectedByRehash
in interface DistributionManager
key
- key to test
public TransactionLogger getTransactionLogger()
getTransactionLogger
in interface DistributionManager
public List<Address> requestPermissionToJoin(Address joiner)
DistributionManager
requestPermissionToJoin
in interface DistributionManager
joiner
- joiner who wants to join
public void notifyJoinComplete(Address joiner)
DistributionManager
notifyJoinComplete
in interface DistributionManager
joiner
- joiner who has completed.public void informRehashOnJoin(Address joiner, boolean starting)
DistributionManager
informRehashOnJoin
in interface DistributionManager
public void applyState(ConsistentHash consistentHash, Map<Object,InternalCacheValue> state)
public CacheStore getCacheStoreForRehashing()
DistributionManager
getCacheStoreForRehashing
in interface DistributionManager
public boolean isRehashInProgress()
isRehashInProgress
in interface DistributionManager
public void applyReceivedState(Map<Object,InternalCacheValue> state)
applyReceivedState
in interface DistributionManager
public String getClusterSize()
public boolean isLocatedLocally(String key)
public List<String> locateKey(String key)
|
Google Analytics | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |