K
- V
- public static class MarkupCache.DefaultCacheImplementation<K,V> extends Object implements MarkupCache.ICache<K,V>
Constructor and Description |
---|
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 void clear()
MarkupCache.ICache
clear
in interface MarkupCache.ICache<K,V>
public boolean containsKey(Object key)
MarkupCache.ICache
containsKey
in interface MarkupCache.ICache<K,V>
key
public V get(Object key)
MarkupCache.ICache
get
in interface MarkupCache.ICache<K,V>
key
or null if no matchespublic Collection<K> getKeys()
MarkupCache.ICache
getKeys
in interface MarkupCache.ICache<K,V>
public Collection<V> getValues()
MarkupCache.ICache
getValues
in interface MarkupCache.ICache<K,V>
public void put(K key, V value)
MarkupCache.ICache
put
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.ICache
remove
in interface MarkupCache.ICache<K,V>
public int size()
MarkupCache.ICache
size
in interface MarkupCache.ICache<K,V>
public void shutdown()
MarkupCache.ICache
shutdown
in interface MarkupCache.ICache<K,V>
Copyright © 2006–2022 Apache Software Foundation. All rights reserved.