Hash
, java.io.Serializable
, java.lang.Cloneable
protected static final class ConcurrentCountingMap.Stripe extends java.lang.Object implements java.io.Serializable, java.lang.Cloneable, Hash
Hash.Strategy<K extends java.lang.Object>
Modifier and Type | Field | Description |
---|---|---|
protected byte[][] |
key |
The array of keys.
|
protected int |
mask |
The mask for wrapping a position counter.
|
protected int |
maxFill |
Threshold after which we rehash.
|
protected int |
n |
The current table size.
|
protected int |
size |
Number of entries in the stripe.
|
protected int[] |
value |
The array of values.
|
DEFAULT_GROWTH_FACTOR, DEFAULT_INITIAL_SIZE, DEFAULT_LOAD_FACTOR, FAST_LOAD_FACTOR, FREE, OCCUPIED, PRIMES, REMOVED, VERY_FAST_LOAD_FACTOR
Modifier | Constructor | Description |
---|---|---|
protected |
Stripe() |
Creates a new stripe.
|
Modifier and Type | Method | Description |
---|---|---|
int |
addTo(byte[] array,
int offset,
int length,
long hash,
int incr) |
|
int |
get(byte[] array,
int offset,
int length,
long hash) |
|
int |
put(byte[] array,
int offset,
int length,
long hash,
int v) |
|
protected void |
rehash(int newN) |
Rehashes the stripe.
|
int |
remove(byte[] array,
int offset,
int length,
long hash) |
|
protected int |
shiftKeys(int pos) |
Shifts left entries with the specified hash code, starting at the specified position, and
empties the resulting free entry.
|
protected transient byte[][] key
protected transient int[] value
protected int n
protected int maxFill
protected transient int mask
protected int size
public int put(byte[] array, int offset, int length, long hash, int v)
public int addTo(byte[] array, int offset, int length, long hash, int incr)
protected final int shiftKeys(int pos)
pos
- a starting position.public int remove(byte[] array, int offset, int length, long hash)
public int get(byte[] array, int offset, int length, long hash)
protected void rehash(int newN)
newN
- the new size