|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.infinispan.distribution.DistributionManagerImpl
public class DistributionManagerImpl
The default distribution manager implementation
Constructor Summary | |
---|---|
DistributionManagerImpl()
Default constructor |
Method Summary | |
---|---|
ConsistentHash |
getConsistentHash()
Retrieves the consistent hash instance currently in use, an instance of the configured ConsistentHash class (which defaults to DefaultConsistentHash . |
DataLocality |
getLocality(Object key)
Returns the data locality characteristics of a given key. |
Address |
getPrimaryLocation(Object key)
Returns the first Address containing the key. |
ConsistentHash |
getReadConsistentHash()
|
ConsistentHash |
getWriteConsistentHash()
|
void |
init(RpcManager rpcManager,
StateTransferManager stateTransferManager)
|
boolean |
isAffectedByRehash(Object key)
Tests whether a given key is affected by a rehash that may be in progress. |
boolean |
isJoinComplete()
Tests whether the current instance has completed joining the cluster |
boolean |
isLocal(Object key)
Deprecated. |
boolean |
isLocatedLocally(String key)
|
boolean |
isRehashInProgress()
Tests whether a rehash is in progress |
List<Address> |
locate(Object key)
Locates a key in a cluster. |
Set<Address> |
locateAll(Collection<Object> keys)
Locates a list of keys in a cluster. |
List<String> |
locateKey(String key)
|
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(RpcManager rpcManager, StateTransferManager stateTransferManager)
@Deprecated public boolean isLocal(Object key)
DistributionManager
DistributionManager.getLocality(Object)
instead.
isLocal
in interface DistributionManager
key
- key to test
public DataLocality getLocality(Object key)
DistributionManager
getLocality
in interface DistributionManager
key
- key to test
public List<Address> locate(Object key)
DistributionManager
locate
in interface DistributionManager
key
- key to test
public Address getPrimaryLocation(Object key)
DistributionManager
DistributionManager.locate(Object)
getPrimaryLocation
in interface DistributionManager
key
- key to test
public Set<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 locate
public ConsistentHash getConsistentHash()
DistributionManager
DefaultConsistentHash
.
getConsistentHash
in interface DistributionManager
public ConsistentHash getReadConsistentHash()
getReadConsistentHash
in interface DistributionManager
public ConsistentHash getWriteConsistentHash()
getWriteConsistentHash
in interface DistributionManager
public boolean isAffectedByRehash(Object key)
DistributionManager
isAffectedByRehash
in interface DistributionManager
key
- key to test
public boolean isRehashInProgress()
isRehashInProgress
in interface DistributionManager
public boolean isJoinComplete()
DistributionManager
isJoinComplete
in interface DistributionManager
public boolean isLocatedLocally(String key)
public List<String> locateKey(String key)
|
--> | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |