public interface WeakHashClock<K,V>
Modifier and Type | Method and Description |
---|---|
void |
clear()
Sets the clock size back to zero, no entries
|
void |
clearStaleReferences()
Causes stale references to be cleared from the data
structures.
|
V |
get(K key)
Gets the given key, returning null
if not found
|
boolean |
hasWeakKeys()
Tells if this WeakHashClock has Weak keys
|
Map.Entry<K,V> |
next()
Returns the next key/value pair in the clock,
or null if the clock has no members.
|
void |
put(K key,
V value)
Adds the given pair to the clock.
|
void |
releaseMatching(CacheKeyFilter<K> filter)
Releases all key/value pairs that match the filter
|
V |
remove(K key)
Removes the given key from the clock, if found
|
int |
size()
Returns the number of elements currently
in the clock.
|
void put(K key, V value)
key
- Must not be nullvalue
- May not be nullV get(K key)
key
- The key to search for, may not be nullV remove(K key)
key
- The key to remove, may not be nullvoid releaseMatching(CacheKeyFilter<K> filter)
filter
- A non-null filter that can be used
to delete every key/value pair that matches the filterint size()
Map.Entry<K,V> next()
void clear()
void clearStaleReferences()
boolean hasWeakKeys()
Copyright © 2009-2017, Oracle and/or its affiliates. All Rights Reserved.