Class CacheLocality
- java.lang.Object
-
- org.wildfly.clustering.infinispan.distribution.CacheLocality
-
- All Implemented Interfaces:
Locality
public class CacheLocality extends Object implements Locality
ALocalityimplementation that delegates to either aConsistentHashLocalityorSimpleLocalitydepending on the cache mode. Instances of this object should not be retained for longer than a single unit of work, since this object holds a final reference to the current ConsistentHash, which will become stale on topology change.- Author:
- Paul Ferraro
-
-
Constructor Summary
Constructors Constructor Description CacheLocality(org.infinispan.Cache<?,?> cache)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisLocal(Object key)Indicates whether the current node is the primary owner of the specified cache key.
-