K - V - public static class MarkupCache.DefaultCacheImplementation<K,V> extends Object implements MarkupCache.ICache<K,V>
| Constructor and Description |
|---|
MarkupCache.DefaultCacheImplementation()
Construct.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clear the cache
|
boolean |
containsKey(Object key)
Check if key is in the cache
|
V |
get(Object key)
Get the cache element associated with the key
|
Collection<K> |
getKeys()
Get all the keys referencing cache entries
|
Collection<V> |
getValues()
Get all the values referencing cache entries
|
void |
put(K key,
V value)
Put an entry into the cache
|
boolean |
remove(K key)
Remove an entry from the cache.
|
void |
shutdown()
Cleanup and shutdown
|
int |
size()
Get the number of cache entries
|
public MarkupCache.DefaultCacheImplementation()
public void clear()
MarkupCache.ICacheclear in interface MarkupCache.ICache<K,V>public boolean containsKey(Object key)
MarkupCache.ICachecontainsKey in interface MarkupCache.ICache<K,V>keypublic V get(Object key)
MarkupCache.ICacheget in interface MarkupCache.ICache<K,V>key or null if no matchespublic Collection<K> getKeys()
MarkupCache.ICachegetKeys in interface MarkupCache.ICache<K,V>public Collection<V> getValues()
MarkupCache.ICachegetValues in interface MarkupCache.ICache<K,V>public void put(K key, V value)
MarkupCache.ICacheput in interface MarkupCache.ICache<K,V>key - The reference key to find the element. Must not be null.value - The element to be cached. Must not be null.public boolean remove(K key)
MarkupCache.ICacheremove in interface MarkupCache.ICache<K,V>public int size()
MarkupCache.ICachesize in interface MarkupCache.ICache<K,V>public void shutdown()
MarkupCache.ICacheshutdown in interface MarkupCache.ICache<K,V>Copyright © 2006–2021 Apache Software Foundation. All rights reserved.