Infinispan Distribution 5.2.6.Final-redhat-2

org.infinispan.client.hotrod.impl.consistenthash
Interface ConsistentHash

All Known Implementing Classes:
ConsistentHashV1, ConsistentHashV2

public interface ConsistentHash

Abstraction for the used consistent hash.

Since:
4.1
Author:
Mircea.Markus@jboss.com

Method Summary
 int getNormalizedHash(Object object)
          Computes hash code of a given object, and then normalizes it to ensure a positive value is always returned.
 SocketAddress getServer(byte[] key)
           
 void init(Map<SocketAddress,Set<Integer>> servers2Hash, int numKeyOwners, int hashSpace)
           
 

Method Detail

init

void init(Map<SocketAddress,Set<Integer>> servers2Hash,
          int numKeyOwners,
          int hashSpace)

getServer

SocketAddress getServer(byte[] key)

getNormalizedHash

int getNormalizedHash(Object object)
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

Infinispan Distribution 5.2.6.Final-redhat-2

Copyright © 2013 JBoss, a division of Red Hat. All Rights Reserved.