public interface KeyPartitioner extends Matchable<KeyPartitioner>, ToIntFunction<Object>
Modifier and Type | Method and Description |
---|---|
default int |
applyAsInt(Object value) |
int |
getSegment(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(Object value)
applyAsInt
in interface ToIntFunction<Object>
int getSegment(Object key)
default boolean matches(KeyPartitioner other)
matches
in interface Matchable<KeyPartitioner>
Copyright © 2021 JBoss by Red Hat. All rights reserved.