Interface Locality
- All Known Implementing Classes:
ConsistentHashLocality,SimpleLocality
public interface Locality
Facility for determining the primary ownership/location of a given cache key.
- Author:
- Paul Ferraro
-
Method Summary
Modifier and TypeMethodDescriptionstatic LocalityforConsistentHash(org.infinispan.Cache<?, ?> cache, org.infinispan.distribution.ch.ConsistentHash hash) static LocalityforCurrentConsistentHash(org.infinispan.Cache<?, ?> cache) booleanIndicates whether the current node is the primary owner of the specified cache key.static Localityof(boolean local)
-
Method Details
-
isLocal
Indicates whether the current node is the primary owner of the specified cache key. For local caches, this method will always return true.- Parameters:
key- a cache key- Returns:
- true, if the current node is the primary owner of the specified cache key, false otherwise
-
of
-
forCurrentConsistentHash
-
forConsistentHash
static Locality forConsistentHash(org.infinispan.Cache<?, ?> cache, org.infinispan.distribution.ch.ConsistentHash hash)
-