|
ehcache | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.ehcache.constructs.blocking.BlockingCache net.sf.ehcache.constructs.blocking.SelfPopulatingCache net.sf.ehcache.constructs.blocking.UpdatingSelfPopulatingCache
public class UpdatingSelfPopulatingCache
A Cache
backed cache that creates entries on demand.
Field Summary |
---|
Fields inherited from class net.sf.ehcache.constructs.blocking.SelfPopulatingCache |
---|
factory |
Fields inherited from class net.sf.ehcache.constructs.blocking.BlockingCache |
---|
cache, LOCK_NUMBER, locks, timeoutMillis |
Constructor Summary | |
---|---|
UpdatingSelfPopulatingCache(Ehcache cache,
UpdatingCacheEntryFactory factory)
Creates a SelfPopulatingCache. |
Method Summary | |
---|---|
Element |
get(java.lang.Object key)
Looks up an object. |
void |
refresh()
This method should not be used. |
protected void |
update(java.lang.Object key)
Element can never be null. |
Methods inherited from class net.sf.ehcache.constructs.blocking.SelfPopulatingCache |
---|
refreshElement |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface net.sf.ehcache.Ehcache |
---|
toString |
Constructor Detail |
---|
public UpdatingSelfPopulatingCache(Ehcache cache, UpdatingCacheEntryFactory factory) throws CacheException
CacheException
Method Detail |
---|
public Element get(java.lang.Object key) throws LockTimeoutException
UpdatingCacheEntryFactory
's
It is expected that
gets, which update as part of the get, might take considerable time. Access to the cache cannot be blocked
while that is happening. This method is therefore not synchronized. Mutexes are used for thread safety based on key
get
in interface Ehcache
get
in class SelfPopulatingCache
key
-
CacheException
LockTimeoutException
- if timeout millis is non zero and this method has been unable to
acquire a lock in that timeEhcache.isExpired(net.sf.ehcache.Element)
protected void update(java.lang.Object key)
key
- public void refresh() throws CacheException
refresh
in class SelfPopulatingCache
CacheException
|
ehcache | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |