org.apache.wicket.markup
Class MarkupCache.DefaultCacheImplementation<K,V>

java.lang.Object
  extended by org.apache.wicket.markup.MarkupCache.DefaultCacheImplementation<K,V>
Type Parameters:
K -
V -
All Implemented Interfaces:
MarkupCache.ICache<K,V>
Enclosing class:
MarkupCache

public class MarkupCache.DefaultCacheImplementation<K,V>
extends Object
implements MarkupCache.ICache<K,V>


Constructor Summary
MarkupCache.DefaultCacheImplementation()
          Construct.
 
Method Summary
 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
 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MarkupCache.DefaultCacheImplementation

public MarkupCache.DefaultCacheImplementation()
Construct.

Method Detail

clear

public void clear()
Description copied from interface: MarkupCache.ICache
Clear the cache

Specified by:
clear in interface MarkupCache.ICache<K,V>
See Also:
MarkupCache.ICache.clear()

containsKey

public boolean containsKey(Object key)
Description copied from interface: MarkupCache.ICache
Check if key is in the cache

Specified by:
containsKey in interface MarkupCache.ICache<K,V>
Returns:
true if cache contains key key
See Also:
MarkupCache.ICache.containsKey(java.lang.Object)

get

public V get(Object key)
Description copied from interface: MarkupCache.ICache
Get the cache element associated with the key

Specified by:
get in interface MarkupCache.ICache<K,V>
Returns:
cached object for key key or null if no matches
See Also:
MarkupCache.ICache.get(java.lang.Object)

getKeys

public Collection<K> getKeys()
Description copied from interface: MarkupCache.ICache
Get all the keys referencing cache entries

Specified by:
getKeys in interface MarkupCache.ICache<K,V>
Returns:
collection of cached keys
See Also:
MarkupCache.ICache.getKeys()

put

public void put(K key,
                V value)
Description copied from interface: MarkupCache.ICache
Put an entry into the cache

Specified by:
put in interface MarkupCache.ICache<K,V>
Parameters:
key - The reference key to find the element
value - The element to be cached
See Also:
MarkupCache.ICache.put(java.lang.Object, java.lang.Object)

remove

public boolean remove(K key)
Description copied from interface: MarkupCache.ICache
Remove an entry from the cache.

Specified by:
remove in interface MarkupCache.ICache<K,V>
Returns:
true, if found and removed
See Also:
MarkupCache.ICache.remove(java.lang.Object)

size

public int size()
Description copied from interface: MarkupCache.ICache
Get the number of cache entries

Specified by:
size in interface MarkupCache.ICache<K,V>
Returns:
number of cache entries
See Also:
MarkupCache.ICache.size()

shutdown

public void shutdown()
Description copied from interface: MarkupCache.ICache
Cleanup and shutdown

Specified by:
shutdown in interface MarkupCache.ICache<K,V>
See Also:
MarkupCache.ICache.shutdown()


Copyright © 2004-2011 Apache Software Foundation. All Rights Reserved.