K
- V
- public class GrouperCache<K,V> extends Object
Constructor and Description |
---|
GrouperCache(net.sf.ehcache.Cache theCache) |
GrouperCache(String cacheName)
construct with cache name
|
GrouperCache(String cacheName,
int defaultMaxElementsInMemory,
boolean defaultEternal,
int defaultTimeToIdleSeconds,
int defaultTimeToLiveSeconds,
boolean defaultOverflowToDisk)
construct with cache name
|
Modifier and Type | Method and Description |
---|---|
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() |
Set<K> |
keySet()
get a set of the keys in the cache
|
void |
notifyDatabaseOfChanges() |
void |
put(K key,
V value)
put a value into the cache, accept the default time to live for this cache
|
void |
registerDatabaseClearableCache()
register a cache for database clearable.
|
V |
remove(K key)
remove an item if it exists
|
Collection<V> |
values()
values
|
public GrouperCache(net.sf.ehcache.Cache theCache)
theCache
- public GrouperCache(String cacheName)
cacheName
- should be unique, prefix with fully qualified classnamepublic GrouperCache(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 overflowpublic Collection<V> values()
public void clear()
public void registerDatabaseClearableCache()
name
- public void notifyDatabaseOfChanges()
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 Set<K> keySet()
public V remove(K key)
key
- public void put(K key, V value)
key
- value
- public net.sf.ehcache.Statistics getStats()
Copyright © 2016 Internet2. All rights reserved.