|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.ehcache.constructs.EhcacheDecoratorAdapter
net.sf.ehcache.constructs.blocking.BlockingCache
net.sf.ehcache.constructs.blocking.SelfPopulatingCache
com.googlecode.ehcache.annotations.RefreshingSelfPopulatingCache
public class RefreshingSelfPopulatingCache
Extension of SelfPopulatingCache that schedules a periodic call of SelfPopulatingCache.refresh() via the specified
TaskSchedulerAdapter. Also overrides refreshElement(Element, Ehcache, boolean) to allow for
asynchronous refresh of elements iff an Executor was provided to the constructor.
| Field Summary | |
|---|---|
protected org.slf4j.Logger |
logger
|
| Fields inherited from class net.sf.ehcache.constructs.blocking.SelfPopulatingCache |
|---|
factory |
| Fields inherited from class net.sf.ehcache.constructs.blocking.BlockingCache |
|---|
timeoutMillis |
| Fields inherited from class net.sf.ehcache.constructs.EhcacheDecoratorAdapter |
|---|
underlyingCache |
| Constructor Summary | |
|---|---|
RefreshingSelfPopulatingCache(net.sf.ehcache.Ehcache cache,
net.sf.ehcache.constructs.blocking.CacheEntryFactory cacheEntryFactory,
TaskSchedulerAdapter scheduler,
org.springframework.core.task.TaskExecutor executer,
long refreshInterval)
|
|
| Method Summary | |
|---|---|
long |
getRefreshInterval()
|
protected net.sf.ehcache.Element |
refreshElement(net.sf.ehcache.Element element,
net.sf.ehcache.Ehcache backingCache,
boolean quiet)
|
protected void |
scheduleRefreshTask()
|
| Methods inherited from class net.sf.ehcache.constructs.blocking.SelfPopulatingCache |
|---|
get, makeAndCheckElement, refresh, refresh, refresh, refresh, refreshElement |
| Methods inherited from class net.sf.ehcache.constructs.blocking.BlockingCache |
|---|
get, getAllWithLoader, getCache, getLockForKey, getTimeoutMillis, getWithLoader, liveness, load, loadAll, put, registerCacheLoader, setTimeoutMillis, unregisterCacheLoader |
| Methods inherited from class net.sf.ehcache.constructs.EhcacheDecoratorAdapter |
|---|
acquireReadLockOnKey, acquireWriteLockOnKey, addPropertyChangeListener, bootstrap, calculateInMemorySize, calculateOffHeapSize, clearStatistics, clone, createQuery, disableDynamicFeatures, dispose, evictExpiredElements, flush, getAverageGetTime, getAverageSearchTime, getBootstrapCacheLoader, getCacheConfiguration, getCacheEventNotificationService, getCacheExceptionHandler, getCacheManager, getDiskStoreSize, getGuid, getInternalContext, getKeys, getKeysNoDuplicateCheck, getKeysWithExpiryCheck, getLiveCacheStatistics, getMemoryStoreSize, getName, getOffHeapStoreSize, getQuiet, getQuiet, getRegisteredCacheExtensions, getRegisteredCacheLoaders, getRegisteredCacheWriter, getSampledCacheStatistics, getSearchAttribute, getSearchesPerSecond, getSize, getSizeBasedOnAccuracy, getStatistics, getStatisticsAccuracy, getStatus, getWriterManager, initialise, isClusterBulkLoadEnabled, isClusterCoherent, isDisabled, isElementInMemory, isElementInMemory, isElementOnDisk, isElementOnDisk, isExpired, isKeyInCache, isNodeBulkLoadEnabled, isNodeCoherent, isReadLockedByCurrentThread, isSampledStatisticsEnabled, isSearchable, isStatisticsEnabled, isValueInCache, isWriteLockedByCurrentThread, put, putIfAbsent, putQuiet, putWithWriter, registerCacheExtension, registerCacheUsageListener, registerCacheWriter, releaseReadLockOnKey, releaseWriteLockOnKey, remove, remove, remove, remove, removeAll, removeAll, removeCacheUsageListener, removeElement, removePropertyChangeListener, removeQuiet, removeQuiet, removeWithWriter, replace, replace, setBootstrapCacheLoader, setCacheExceptionHandler, setCacheManager, setDisabled, setDiskStorePath, setName, setNodeBulkLoadEnabled, setNodeCoherent, setSampledStatisticsEnabled, setStatisticsAccuracy, setStatisticsEnabled, setTransactionManagerLookup, toString, tryReadLockOnKey, tryWriteLockOnKey, unregisterCacheExtension, unregisterCacheWriter, waitUntilClusterBulkLoadComplete, waitUntilClusterCoherent |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected final org.slf4j.Logger logger
| Constructor Detail |
|---|
public RefreshingSelfPopulatingCache(net.sf.ehcache.Ehcache cache,
net.sf.ehcache.constructs.blocking.CacheEntryFactory cacheEntryFactory,
TaskSchedulerAdapter scheduler,
org.springframework.core.task.TaskExecutor executer,
long refreshInterval)
| Method Detail |
|---|
public long getRefreshInterval()
protected void scheduleRefreshTask()
protected net.sf.ehcache.Element refreshElement(net.sf.ehcache.Element element,
net.sf.ehcache.Ehcache backingCache,
boolean quiet)
throws java.lang.Exception
refreshElement in class net.sf.ehcache.constructs.blocking.SelfPopulatingCachejava.lang.Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||