public class HashConfiguration extends Object implements Matchable<HashConfiguration>
Modifier and Type | Field and Description |
---|---|
static AttributeDefinition<Float> |
CAPACITY_FACTOR |
static AttributeDefinition<ConsistentHashFactory> |
CONSISTENT_HASH_FACTORY |
static AttributeDefinition<Hash> |
HASH |
static AttributeDefinition<KeyPartitioner> |
KEY_PARTITIONER |
static AttributeDefinition<Integer> |
NUM_OWNERS |
static AttributeDefinition<Integer> |
NUM_SEGMENTS |
Modifier and Type | Method and Description |
---|---|
AttributeSet |
attributes() |
ConsistentHash |
consistentHash()
Deprecated.
Since 5.2, replaced by
consistentHashFactory() . |
ConsistentHashFactory<?> |
consistentHashFactory()
The consistent hash factory in use.
|
boolean |
equals(Object obj) |
GroupsConfiguration |
groups()
Configuration for various grouper definitions.
|
Hash |
hash()
Deprecated.
Since 8.2, use
keyPartitioner() instead. |
int |
hashCode() |
KeyPartitioner |
keyPartitioner() |
boolean |
matches(HashConfiguration other) |
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() |
public static final AttributeDefinition<ConsistentHashFactory> CONSISTENT_HASH_FACTORY
public static final AttributeDefinition<Hash> HASH
public static final AttributeDefinition<Integer> NUM_OWNERS
public static final AttributeDefinition<Integer> NUM_SEGMENTS
public static final AttributeDefinition<Float> CAPACITY_FACTOR
public static final AttributeDefinition<KeyPartitioner> KEY_PARTITIONER
@Deprecated public ConsistentHash consistentHash()
consistentHashFactory()
.public ConsistentHashFactory<?> consistentHashFactory()
@Deprecated public Hash hash()
keyPartitioner()
instead.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 KeyPartitioner keyPartitioner()
public GroupsConfiguration groups()
public AttributeSet attributes()
public boolean matches(HashConfiguration other)
matches
in interface Matchable<HashConfiguration>
Copyright © 2018 JBoss, a division of Red Hat. All rights reserved.