|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.cache.util.Caches.HashKeySelector<T>
public static class Caches.HashKeySelector<T>
Class that returns a child name to use based on the hash code of a key.
Field Summary | |
---|---|
protected int |
segments
|
Constructor Summary | |
---|---|
Caches.HashKeySelector(int segments)
Constructs with N segments, where N must be a power of 2. |
Method Summary | |
---|---|
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()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected int segments
Constructor Detail |
---|
public Caches.HashKeySelector(int segments)
segments
- Number of hash segmentsMethod Detail |
---|
protected 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.
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |