public interface KeyPartitioner extends Matchable<KeyPartitioner>, java.util.function.ToIntFunction<java.lang.Object>
| Modifier and Type | Method and Description |
|---|---|
default int |
applyAsInt(java.lang.Object value) |
int |
getSegment(java.lang.Object key)
Obtains the segment for a key.
|
default void |
init(HashConfiguration configuration)
Initialization.
|
default boolean |
matches(KeyPartitioner other) |
default void init(HashConfiguration configuration)
The partitioner can also use injection to access other cache-level or global components. This method will be called before any other injection methods.
Does not need to be thread-safe (Infinispan safely publishes the instance after initialization).
configuration - default int applyAsInt(java.lang.Object value)
applyAsInt in interface java.util.function.ToIntFunction<java.lang.Object>int getSegment(java.lang.Object key)
default boolean matches(KeyPartitioner other)
matches in interface Matchable<KeyPartitioner>