public class Hash<E extends Entry> extends Object
| Constructor and Description |
|---|
Hash() |
| Modifier and Type | Method and Description |
|---|---|
static int |
calcEntryCount(Entry[] _hashTable)
Count the entries in the hash table, by scanning through the hash table.
|
static void |
calcHashCollisionInfo(org.cache2k.impl.BaseCache.CollisionInfo inf,
Entry[] _hashTable) |
void |
cleared()
The cache with this hash was cleared and the hash table is no longer
in used.
|
void |
close()
Cache was closed.
|
static boolean |
contains(Entry[] _hashTable,
Object key,
int _hashCode) |
void |
decrementSuppressExpandCount() |
void |
incrementSuppressExpandCount()
Usage/reference counter for iterations to suspend expand
until the iteration finished.
|
static int |
index(Entry[] _hashTable,
int _hashCode) |
E[] |
init(Class<E> _entryType) |
E[] |
insert(E[] _hashTable,
Entry _entry) |
static void |
insertWoExpand(Entry[] _hashTable,
Entry e) |
boolean |
isCleared()
Operations should terminate
|
boolean |
isClosed()
Operations should terminate and throw a
CacheClosedException |
static <E extends Entry> |
lookup(E[] _hashTable,
Object key,
int _hashCode) |
E |
remove(E[] _hashTable,
Object key,
int hc)
Remove entry from the hash.
|
boolean |
remove(Entry[] _hashTable,
Entry _entry) |
boolean |
shouldAbort() |
public Hash()
public static void insertWoExpand(Entry[] _hashTable, Entry e)
public static void calcHashCollisionInfo(org.cache2k.impl.BaseCache.CollisionInfo inf, Entry[] _hashTable)
public static int calcEntryCount(Entry[] _hashTable)
public E remove(E[] _hashTable, Object key, int hc)
public void incrementSuppressExpandCount()
Failing to operate the increment/decrement in balance will mean that hash table expands are blocked forever, which is a serious error condition. Typical problems arise by thrown exceptions during an iteration.
public void decrementSuppressExpandCount()
public void cleared()
public void close()
public boolean isCleared()
public boolean isClosed()
CacheClosedExceptionpublic boolean shouldAbort()
cache2k API documentation. Copyright © 2000–2015 headissue GmbH, Munich.