![JAR search and dependency download from the Maven repository](/logo.png)
org.infinispan.hotrod.impl.consistenthash.ConsistentHash Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of infinispan-hotrod-jakarta Show documentation
Show all versions of infinispan-hotrod-jakarta Show documentation
Infinispan Hot Rod Client Jakarta EE
package org.infinispan.hotrod.impl.consistenthash;
import java.net.SocketAddress;
import java.util.Map;
import java.util.Set;
/**
* Abstraction for the used consistent hash.
*
* @since 14.0
*/
public interface ConsistentHash {
Class extends ConsistentHash>[] DEFAULT = new Class[] {null, ConsistentHashV2.class, SegmentConsistentHash.class};
@Deprecated(forRemoval = true)
void init(Map> servers2Hash, int numKeyOwners, int hashSpace);
SocketAddress getServer(Object key);
/**
* Computes hash code of a given object, and then normalizes it to ensure a positive
* value is always returned.
* @param object to hash
* @return a non-null, non-negative normalized hash code for a given object
*/
int getNormalizedHash(Object object);
Map> getSegmentsByServer();
default Map> getPrimarySegmentsByServer() {
return null;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy