public class HashConfiguration
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private float |
capacityFactor |
private org.infinispan.distribution.ch.ConsistentHashFactory |
consistentHashFactory |
private GroupsConfiguration |
groupsConfiguration |
private Hash |
hash |
private int |
numOwners |
private int |
numSegments |
private StateTransferConfiguration |
stateTransferConfiguration |
Constructor and Description |
---|
HashConfiguration(org.infinispan.distribution.ch.ConsistentHashFactory consistentHashFactory,
Hash hash,
int numOwners,
int numSegments,
float capacityFactor,
GroupsConfiguration groupsConfiguration,
StateTransferConfiguration stateTransferConfiguration) |
Modifier and Type | Method and Description |
---|---|
float |
capacityFactor()
Controls the proportion of entries that will reside on the local node, compared to the other nodes in the
cluster.
|
org.infinispan.distribution.ch.ConsistentHash |
consistentHash()
Deprecated.
Since 5.2, replaced by
consistentHashFactory() . |
org.infinispan.distribution.ch.ConsistentHashFactory |
consistentHashFactory()
The consistent hash factory in use.
|
boolean |
equals(java.lang.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. |
java.lang.String |
toString() |
private final org.infinispan.distribution.ch.ConsistentHashFactory consistentHashFactory
private final Hash hash
private final int numOwners
private final int numSegments
private final float capacityFactor
private final GroupsConfiguration groupsConfiguration
private final StateTransferConfiguration stateTransferConfiguration
HashConfiguration(org.infinispan.distribution.ch.ConsistentHashFactory consistentHashFactory, Hash hash, int numOwners, int numSegments, float capacityFactor, GroupsConfiguration groupsConfiguration, StateTransferConfiguration stateTransferConfiguration)
@Deprecated public org.infinispan.distribution.ch.ConsistentHash consistentHash()
consistentHashFactory()
.public org.infinispan.distribution.ch.ConsistentHashFactory consistentHashFactory()
public Hash hash()
ConsistentHash
implementations shipped.public int numOwners()
@Deprecated public int numVirtualNodes()
numSegments()
(which works like a
numVirtualNodes
value for the entire cluster).public int numSegments()
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
.
@Deprecated public boolean rehashEnabled()
StateTransferConfiguration.fetchInMemoryState()
instead.@Deprecated public long rehashRpcTimeout()
StateTransferConfiguration.timeout()
instead.@Deprecated public long rehashWait()
StateTransferConfiguration.timeout()
instead.public float capacityFactor()
2
will
have twice as many entries as a node with a capacity factor of 1
.public GroupsConfiguration groups()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object