Class SingleSegmentKeyPartitioner
- java.lang.Object
-
- org.infinispan.distribution.ch.impl.SingleSegmentKeyPartitioner
-
- All Implemented Interfaces:
ToIntFunction<Object>
,org.infinispan.commons.configuration.attributes.Matchable<KeyPartitioner>
,KeyPartitioner
public class SingleSegmentKeyPartitioner extends Object implements KeyPartitioner
KeyPartitioner that always returns 0 for a given segment. This can be useful when segments are not in use, such as local or invalidation caches.- Since:
- 9.3
- Author:
- wburns
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SingleSegmentKeyPartitioner
getInstance()
int
getSegment(Object key)
Obtains the segment for a key.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.infinispan.distribution.ch.KeyPartitioner
applyAsInt, init, matches
-
-
-
-
Method Detail
-
getInstance
public static SingleSegmentKeyPartitioner getInstance()
-
getSegment
public int getSegment(Object key)
Description copied from interface:KeyPartitioner
Obtains the segment for a key. Must be thread-safe.- Specified by:
getSegment
in interfaceKeyPartitioner
-
-