public static class Caches.HashKeySelector<T> extends Object implements Caches.ChildSelector<T>
| Modifier and Type | Field and Description |
|---|---|
protected int |
segments |
| Constructor and Description |
|---|
Caches.HashKeySelector(int segments)
Constructs with N segments, where N must be a power of 2.
|
| Modifier and Type | Method and Description |
|---|---|
protected Fqn |
childName(int segment)
Returns the node name for this segment.
|
Fqn |
childName(T key)
Returns the node name for this key.
|
protected int |
segmentFor(T key)
Returns the segment for this key, in the inclusive range 0 to
segments - 1. |
String |
toString() |
public Caches.HashKeySelector(int segments)
segments - Number of hash segmentsprotected final int segmentFor(T key)
segments - 1.protected final Fqn childName(int segment)
public final Fqn childName(T key)
childName in interface Caches.ChildSelector<T>key - for calls to Map.put(K, V), Map.get(java.lang.Object) etc.Copyright © 2012 JBoss, a division of Red Hat. All Rights Reserved.