|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | PROPERTY | CONSTR | METHOD | DETAIL: FIELD | PROPERTY | CONSTR | METHOD |
java.lang.ObjectSpringcacheService
class SpringcacheService
Field Summary | |
---|---|
private static java.lang.Object |
log
|
Property Summary | |
---|---|
org.springframework.context.ApplicationContext |
applicationContext
|
boolean |
autoCreateCaches
|
net.sf.ehcache.CacheManager |
springcacheCacheManager
|
static java.lang.Object |
transactional
|
Constructor Summary | |
SpringcacheService()
|
Method Summary | |
---|---|
void
|
clearStatistics()
Clears statistics for all caches held by the service's cache manager. |
private net.sf.ehcache.Ehcache
|
createNewCacheWithDefaults(java.lang.String name)
|
java.lang.Object
|
doWithBlockingCache(java.lang.String cacheName, java.io.Serializable key, groovy.lang.Closure closure)
A variant on doWithCache that guarantees the cache used will be a BlockingCache instance. |
java.lang.Object
|
doWithCache(java.lang.String cacheName, java.io.Serializable key, groovy.lang.Closure closure)
Calls a closure conditionally depending on whether a cache entry from a previous invocation exists. |
private java.lang.Object
|
doWithCacheInternal(net.sf.ehcache.Ehcache cache, java.io.Serializable key, groovy.lang.Closure closure)
|
void
|
flush(java.lang.Object cacheNamePatterns)
Flushes the specified cache or set of caches. |
void
|
flushAll()
Flushes all caches held by the service's cache manager. |
private java.lang.Object
|
flushNamedCache(java.lang.String name)
|
net.sf.ehcache.constructs.blocking.BlockingCache
|
getOrCreateBlockingCache(java.lang.String name)
Gets a named blocking cache instance from the cache manager. |
net.sf.ehcache.Ehcache
|
getOrCreateCache(java.lang.String name)
Gets a named cache instance from the cache manager. |
static boolean
|
isEnabled()
|
Methods inherited from class java.lang.Object | |
---|---|
java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Field Detail |
---|
private static final java.lang.Object log
Property Detail |
---|
org.springframework.context.ApplicationContext applicationContext
boolean autoCreateCaches
net.sf.ehcache.CacheManager springcacheCacheManager
static java.lang.Object transactional
Constructor Detail |
---|
SpringcacheService()
Method Detail |
---|
void clearStatistics()
private net.sf.ehcache.Ehcache createNewCacheWithDefaults(java.lang.String name)
java.lang.Object doWithBlockingCache(java.lang.String cacheName, java.io.Serializable key, groovy.lang.Closure closure)
cacheName
- The name of the cache to use. If the named cache is not a BlockingCache instance it will be
decorated with one and replaced in the cache manager.key
- The key used to get and put cache entries.closure
- The closure to invoke if no cache entry exists already.
java.lang.Object doWithCache(java.lang.String cacheName, java.io.Serializable key, groovy.lang.Closure closure)
cacheName
- The name of the cache to use.key
- The key used to get and put cache entries.closure
- The closure to invoke if no cache entry exists already.
private java.lang.Object doWithCacheInternal(net.sf.ehcache.Ehcache cache, java.io.Serializable key, groovy.lang.Closure closure)
void flush(java.lang.Object cacheNamePatterns)
cacheNamePatterns
- can be a single cache name or a regex pattern or a Collection/array of them.
void flushAll()
private java.lang.Object flushNamedCache(java.lang.String name)
net.sf.ehcache.constructs.blocking.BlockingCache getOrCreateBlockingCache(java.lang.String name)
name
- The cache name.
net.sf.ehcache.Ehcache getOrCreateCache(java.lang.String name)
name
- The cache name.
static boolean isEnabled()
Groovy Documentation