| Constructor and Description |
|---|
EhConfiguredCache(String cacheName,
net.sf.ehcache.CacheManager cacheManager)
Create a new EhCache cache with the given name for the given cache manager if one does not
already exist.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addElement(K key,
V value)
Stores an entry into the cache.
|
long |
getCapacity()
Returns the capacity of the cache.
|
V |
getElement(K key)
Retrieves an entry for the cache.
|
long |
getSize() |
V |
removeElement(K key)
Removes an entry from the cache.
|
public EhConfiguredCache(String cacheName, net.sf.ehcache.CacheManager cacheManager)
cacheName - the name to use for the cachecacheManager - the cache manager in which to create the cachepublic void addElement(K key, V value)
addElement in interface Cache<K,V>public V getElement(K key)
getElement in interface Cache<K,V>public V removeElement(K key)
removeElement in interface Cache<K,V>key - The entry to return.public long getCapacity()
getCapacity in interface Cache<K,V>Copyright © 2007-2014 The Apache Software Foundation. All Rights Reserved.