public interface ConsistentHash
Modifier and Type | Method and Description |
---|---|
int |
getNormalizedHash(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>> |
getPrimarySegmentsByServer() |
Map<SocketAddress,Set<Integer>> |
getSegmentsByServer() |
SocketAddress |
getServer(Object key) |
void |
init(Map<SocketAddress,Set<Integer>> servers2Hash,
int numKeyOwners,
int hashSpace)
Deprecated.
|
@Deprecated void init(Map<SocketAddress,Set<Integer>> servers2Hash, int numKeyOwners, int hashSpace)
SocketAddress getServer(Object key)
int getNormalizedHash(Object object)
object
- to hashMap<SocketAddress,Set<Integer>> getSegmentsByServer()
default Map<SocketAddress,Set<Integer>> getPrimarySegmentsByServer()
Copyright © 2021 JBoss by Red Hat. All rights reserved.