Interface ConsistentHash
- All Known Implementing Classes:
ConsistentHashV2,SegmentConsistentHash
public interface ConsistentHash
Abstraction for the used consistent hash.
- Since:
- 4.1
- Author:
- Mircea.Markus@jboss.com
-
Method Summary
Modifier and TypeMethodDescriptionintgetNormalizedHash(Object object) Computes hash code of a given object, and then normalizes it to ensure a positive value is always returned.default Map<SocketAddress, Set<Integer>> voidinit(Map<SocketAddress, Set<Integer>> servers2Hash, int numKeyOwners, int hashSpace) Deprecated, for removal: This API element is subject to removal in a future version.
-
Method Details
-
init
@Deprecated(forRemoval=true) void init(Map<SocketAddress, Set<Integer>> servers2Hash, int numKeyOwners, int hashSpace) Deprecated, for removal: This API element is subject to removal in a future version. -
getServer
-
getNormalizedHash
Computes hash code of a given object, and then normalizes it to ensure a positive value is always returned.- Parameters:
object- to hash- Returns:
- a non-null, non-negative normalized hash code for a given object
-
getSegmentsByServer
Map<SocketAddress,Set<Integer>> getSegmentsByServer() -
getPrimarySegmentsByServer
-