Module org.apache.wicket.core
Package org.apache.wicket.markup
Class MarkupCache.DefaultCacheImplementation<K,V>
java.lang.Object
org.apache.wicket.markup.MarkupCache.DefaultCacheImplementation<K,V>
- Type Parameters:
K
-V
-
- All Implemented Interfaces:
MarkupCache.ICache<K,
V>
- Enclosing class:
- MarkupCache
public static class MarkupCache.DefaultCacheImplementation<K,V>
extends Object
implements MarkupCache.ICache<K,V>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
Clear the cacheboolean
containsKey
(Object key) Check if key is in the cacheGet the cache element associated with the keygetKeys()
Get all the keys referencing cache entriesGet all the values referencing cache entriesvoid
Put an entry into the cacheboolean
Remove an entry from the cache.void
shutdown()
Cleanup and shutdownint
size()
Get the number of cache entries
-
Constructor Details
-
DefaultCacheImplementation
public DefaultCacheImplementation()Construct.
-
-
Method Details
-
clear
Description copied from interface:MarkupCache.ICache
Clear the cache- Specified by:
clear
in interfaceMarkupCache.ICache<K,
V>
-
containsKey
Description copied from interface:MarkupCache.ICache
Check if key is in the cache- Specified by:
containsKey
in interfaceMarkupCache.ICache<K,
V> - Returns:
- true if cache contains key
key
-
get
Description copied from interface:MarkupCache.ICache
Get the cache element associated with the key- Specified by:
get
in interfaceMarkupCache.ICache<K,
V> - Returns:
- cached object for key
key
or null if no matches
-
getKeys
Description copied from interface:MarkupCache.ICache
Get all the keys referencing cache entries- Specified by:
getKeys
in interfaceMarkupCache.ICache<K,
V> - Returns:
- collection of cached keys
-
getValues
Description copied from interface:MarkupCache.ICache
Get all the values referencing cache entries- Specified by:
getValues
in interfaceMarkupCache.ICache<K,
V> - Returns:
- collection of cached keys
-
put
Description copied from interface:MarkupCache.ICache
Put an entry into the cache- Specified by:
put
in interfaceMarkupCache.ICache<K,
V> - Parameters:
key
- The reference key to find the element. Must not be null.value
- The element to be cached. Must not be null.
-
remove
Description copied from interface:MarkupCache.ICache
Remove an entry from the cache.- Specified by:
remove
in interfaceMarkupCache.ICache<K,
V> - Returns:
- true, if found and removed
-
size
Description copied from interface:MarkupCache.ICache
Get the number of cache entries- Specified by:
size
in interfaceMarkupCache.ICache<K,
V> - Returns:
- number of cache entries
-
shutdown
Description copied from interface:MarkupCache.ICache
Cleanup and shutdown- Specified by:
shutdown
in interfaceMarkupCache.ICache<K,
V>
-