public class LazyRemovalCache<K,V>
extends java.lang.Object
限定符和类型 | 类和说明 |
---|---|
static class |
LazyRemovalCache.Entry<V> |
static interface |
LazyRemovalCache.Printable<K,V> |
构造器和说明 |
---|
LazyRemovalCache() |
LazyRemovalCache(int max_elements,
long max_age) |
限定符和类型 | 方法和说明 |
---|---|
boolean |
add(K key,
V val) |
void |
clear(boolean force) |
boolean |
containsKey(K key) |
boolean |
containsKeys(java.util.Collection<K> keys)
Returns true if all of the keys in keys are present.
|
java.util.Map<K,V> |
contents() |
java.util.Map<K,V> |
contents(boolean skip_removed_values) |
V |
get(K key) |
K |
getByValue(V val) |
java.util.Set<K> |
keySet() |
java.util.Set<V> |
nonRemovedValues()
Adds all value which have not been marked as removable to the returned set
|
java.lang.String |
printCache() |
java.lang.String |
printCache(LazyRemovalCache.Printable print_function) |
void |
remove(K key) |
void |
remove(K key,
boolean force) |
void |
removeAll(java.util.Collection<K> keys) |
void |
removeAll(java.util.Collection<K> keys,
boolean force) |
void |
removeMarkedElements()
Removes elements marked as removable
|
void |
removeMarkedElements(boolean force)
Removes elements marked as removable
|
void |
retainAll(java.util.Collection<K> keys) |
void |
retainAll(java.util.Collection<K> keys,
boolean force) |
int |
size() |
java.lang.String |
toString() |
java.util.Set<V> |
values() |
java.lang.Iterable<LazyRemovalCache.Entry<V>> |
valuesIterator() |
public LazyRemovalCache()
public LazyRemovalCache(int max_elements, long max_age)
public boolean containsKey(K key)
public boolean containsKeys(java.util.Collection<K> keys)
public void remove(K key)
public void remove(K key, boolean force)
public void removeAll(java.util.Collection<K> keys)
public void removeAll(java.util.Collection<K> keys, boolean force)
public void clear(boolean force)
public void retainAll(java.util.Collection<K> keys)
public void retainAll(java.util.Collection<K> keys, boolean force)
public java.util.Set<K> keySet()
public java.util.Set<V> values()
public java.lang.Iterable<LazyRemovalCache.Entry<V>> valuesIterator()
public java.util.Set<V> nonRemovedValues()
public int size()
public java.lang.String printCache()
public java.lang.String printCache(LazyRemovalCache.Printable print_function)
public java.lang.String toString()
toString
在类中 java.lang.Object
public void removeMarkedElements(boolean force)
force
- If set to true, all elements marked as 'removable' will get removed, regardless of expirationpublic void removeMarkedElements()