Infinispan Distribution 5.2.6.Final-redhat-2

org.infinispan.configuration.cache
Class HashConfiguration

java.lang.Object
  extended by org.infinispan.configuration.cache.HashConfiguration

public class HashConfiguration
extends Object

Allows fine-tuning of rehashing characteristics. Must only used with 'distributed' cache mode.

Author:
pmuir

Method Summary
 ConsistentHash consistentHash()
          Deprecated. Since 5.2, replaced by consistentHashFactory().
 ConsistentHashFactory consistentHashFactory()
          The consistent hash factory in use.
 boolean equals(Object o)
           
 GroupsConfiguration groups()
          Configuration for various grouper definitions.
 Hash hash()
          The hash function in use.
 int hashCode()
           
 int numOwners()
          Number of cluster-wide replicas for each cache entry.
 int numSegments()
          Controls the total number of hash space segments (per cluster).
 int numVirtualNodes()
          Deprecated. No longer used since 5.2, replaced by numSegments() (which works like a numVirtualNodes value for the entire cluster).
 boolean rehashEnabled()
          Deprecated. Use StateTransferConfiguration.fetchInMemoryState() instead.
 long rehashRpcTimeout()
          Deprecated. Use StateTransferConfiguration.timeout() instead.
 long rehashWait()
          Deprecated. Use StateTransferConfiguration.timeout() instead.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

consistentHash

@Deprecated
public ConsistentHash consistentHash()
Deprecated. Since 5.2, replaced by consistentHashFactory().


consistentHashFactory

public ConsistentHashFactory consistentHashFactory()
The consistent hash factory in use.


hash

public Hash hash()
The hash function in use. Used as a bit spreader and a general hash code generator. Typically one of the the many default ConsistentHash implementations shipped.


numOwners

public int numOwners()
Number of cluster-wide replicas for each cache entry.


numVirtualNodes

@Deprecated
public int numVirtualNodes()
Deprecated. No longer used since 5.2, replaced by numSegments() (which works like a numVirtualNodes value for the entire cluster).


numSegments

public int numSegments()
Controls the total number of hash space segments (per cluster).

A hash space segment is the granularity for key distribution in the cluster: a node can own (or primary-own) one or more full segments, but not a fraction of a segment. As such, larger numSegments values will mean a more even distribution of keys between nodes.

On the other hand, the memory/bandwidth usage of the new consistent hash grows linearly with numSegments. So we recommend keeping numSegments <= 10 * clusterSize.


rehashEnabled

@Deprecated
public boolean rehashEnabled()
Deprecated. Use StateTransferConfiguration.fetchInMemoryState() instead.

If false, no rebalancing or rehashing will take place when a new node joins the cluster or a node leaves


rehashRpcTimeout

@Deprecated
public long rehashRpcTimeout()
Deprecated. Use StateTransferConfiguration.timeout() instead.

Rehashing timeout


rehashWait

@Deprecated
public long rehashWait()
Deprecated. Use StateTransferConfiguration.timeout() instead.


groups

public GroupsConfiguration groups()
Configuration for various grouper definitions. See the user guide for more information.


toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

Infinispan Distribution 5.2.6.Final-redhat-2

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