|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.internet2.middleware.grouper.cache.GrouperCache<K,V>
K - V - public class GrouperCache<K,V>
wrapper around ehcache which makes it genericized
| Constructor Summary | |
|---|---|
GrouperCache(net.sf.ehcache.Cache theCache)
|
|
GrouperCache(java.lang.String cacheName)
construct with cache name |
|
GrouperCache(java.lang.String cacheName,
int defaultMaxElementsInMemory,
boolean defaultEternal,
int defaultTimeToIdleSeconds,
int defaultTimeToLiveSeconds,
boolean defaultOverflowToDisk)
construct with cache name |
|
| Method Summary | |
|---|---|
void |
clear()
remove all in cache |
boolean |
containsKey(K key)
see if the cache has this element in it. |
V |
get(K key)
get a value or null if not there or expired this will check for eviction, and evict if evictable |
net.sf.ehcache.Cache |
getCache()
generally you wont need this method, but if you need any methods not exposed in this class, use the cache directly... |
net.sf.ehcache.Statistics |
getStats()
|
net.sf.ehcache.Cache |
internal_getCache()
|
java.util.Set<K> |
keySet()
get a set of the keys in the cache |
void |
put(K key,
V value)
put a value into the cache, accept the default time to live for this cache |
V |
remove(K key)
remove an item if it exists |
java.util.Collection<V> |
values()
values |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GrouperCache(net.sf.ehcache.Cache theCache)
theCache - public GrouperCache(java.lang.String cacheName)
cacheName - should be unique, prefix with fully qualified classname
public GrouperCache(java.lang.String cacheName,
int defaultMaxElementsInMemory,
boolean defaultEternal,
int defaultTimeToIdleSeconds,
int defaultTimeToLiveSeconds,
boolean defaultOverflowToDisk)
cacheName - should be unique, prefix with fully qualified classnamedefaultMaxElementsInMemory - if not in config file, this is max elements in memorydefaultEternal - if not in config file, true to never expire stuffdefaultTimeToIdleSeconds - if not in config file, time where if not accessed, will expiredefaultTimeToLiveSeconds - if not in config file, time where even if accessed, will expiredefaultOverflowToDisk - if not in config file, if it should go to disk in overflow| Method Detail |
|---|
public java.util.Collection<V> values()
public void clear()
public net.sf.ehcache.Cache internal_getCache()
public net.sf.ehcache.Cache getCache()
public V get(K key)
key -
public boolean containsKey(K key)
key -
public java.util.Set<K> keySet()
public V remove(K key)
key -
public void put(K key,
V value)
key - value - public net.sf.ehcache.Statistics getStats()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||