org.apache.jetspeed.cache.impl
Class EhCacheDistributedImpl
java.lang.Object
org.apache.jetspeed.cache.impl.EhCacheImpl
org.apache.jetspeed.cache.impl.EhCacheDistributedImpl
- All Implemented Interfaces:
- java.lang.Cloneable, net.sf.ehcache.event.CacheEventListener, JetspeedCache
public class EhCacheDistributedImpl
- extends EhCacheImpl
- implements JetspeedCache, net.sf.ehcache.event.CacheEventListener
Method Summary |
java.lang.Object |
clone()
|
java.lang.String |
createCacheKey(java.lang.String primary,
java.lang.String secondary)
|
CacheElement |
createElement(java.lang.Object key,
java.lang.Object content)
Create a cached element |
CacheElement |
createElement(java.io.Serializable key,
DistributedCacheObject content)
|
void |
dispose()
|
void |
evictContentForUser(RequestContext context)
|
CacheElement |
get(java.lang.Object key)
Retrieve an object from the cache |
CacheElement |
get(java.io.Serializable key)
|
boolean |
isKeyInCache(java.lang.Object key)
|
boolean |
isKeyInCache(java.io.Serializable key)
|
void |
notifyElement(net.sf.ehcache.Ehcache cache,
boolean local,
net.sf.ehcache.Element arg1,
int action)
|
void |
notifyElementEvicted(net.sf.ehcache.Ehcache cache,
net.sf.ehcache.Element arg1)
|
void |
notifyElementExpired(net.sf.ehcache.Ehcache cache,
net.sf.ehcache.Element arg1)
|
void |
notifyElementPut(net.sf.ehcache.Ehcache cache,
net.sf.ehcache.Element arg1)
|
void |
notifyElementRemoved(net.sf.ehcache.Ehcache cache,
net.sf.ehcache.Element arg1)
|
void |
notifyElementUpdated(net.sf.ehcache.Ehcache cache,
net.sf.ehcache.Element arg1)
|
void |
notifyRemoveAll(net.sf.ehcache.Ehcache cache)
|
void |
put(CacheElement element)
Put an object into the cache, adding it, or replacing if exists |
boolean |
remove(java.lang.Object key)
Remove an object from the cache |
boolean |
remove(java.io.Serializable key)
|
boolean |
removeQuiet(java.lang.Object key)
Remove object from cache, do not notify listeners |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EhCacheDistributedImpl
public EhCacheDistributedImpl(net.sf.ehcache.Ehcache ehcache)
get
public CacheElement get(java.lang.Object key)
- Description copied from interface:
JetspeedCache
- Retrieve an object from the cache
- Specified by:
get
in interface JetspeedCache
- Overrides:
get
in class EhCacheImpl
- Parameters:
key
- The key used to find the object
- Returns:
- the found object or null
get
public CacheElement get(java.io.Serializable key)
isKeyInCache
public boolean isKeyInCache(java.lang.Object key)
- Specified by:
isKeyInCache
in interface JetspeedCache
- Overrides:
isKeyInCache
in class EhCacheImpl
isKeyInCache
public boolean isKeyInCache(java.io.Serializable key)
put
public void put(CacheElement element)
- Description copied from interface:
JetspeedCache
- Put an object into the cache, adding it, or replacing if exists
- Specified by:
put
in interface JetspeedCache
- Overrides:
put
in class EhCacheImpl
createElement
public CacheElement createElement(java.lang.Object key,
java.lang.Object content)
- Description copied from interface:
JetspeedCache
- Create a cached element
- Specified by:
createElement
in interface JetspeedCache
- Overrides:
createElement
in class EhCacheImpl
- Returns:
createElement
public CacheElement createElement(java.io.Serializable key,
DistributedCacheObject content)
remove
public boolean remove(java.lang.Object key)
- Description copied from interface:
JetspeedCache
- Remove an object from the cache
- Specified by:
remove
in interface JetspeedCache
- Overrides:
remove
in class EhCacheImpl
- Returns:
- true if the object was removed, false otherwise
remove
public boolean remove(java.io.Serializable key)
removeQuiet
public boolean removeQuiet(java.lang.Object key)
- Description copied from interface:
JetspeedCache
- Remove object from cache, do not notify listeners
- Specified by:
removeQuiet
in interface JetspeedCache
- Overrides:
removeQuiet
in class EhCacheImpl
- Returns:
- trie if the object was removed, false otherwise
evictContentForUser
public void evictContentForUser(RequestContext context)
createCacheKey
public java.lang.String createCacheKey(java.lang.String primary,
java.lang.String secondary)
clone
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
- Specified by:
clone
in interface net.sf.ehcache.event.CacheEventListener
- Overrides:
clone
in class EhCacheImpl
- Throws:
java.lang.CloneNotSupportedException
dispose
public void dispose()
- Specified by:
dispose
in interface net.sf.ehcache.event.CacheEventListener
- Overrides:
dispose
in class EhCacheImpl
notifyElement
public void notifyElement(net.sf.ehcache.Ehcache cache,
boolean local,
net.sf.ehcache.Element arg1,
int action)
notifyElementEvicted
public void notifyElementEvicted(net.sf.ehcache.Ehcache cache,
net.sf.ehcache.Element arg1)
- Specified by:
notifyElementEvicted
in interface net.sf.ehcache.event.CacheEventListener
notifyElementExpired
public void notifyElementExpired(net.sf.ehcache.Ehcache cache,
net.sf.ehcache.Element arg1)
- Specified by:
notifyElementExpired
in interface net.sf.ehcache.event.CacheEventListener
notifyElementPut
public void notifyElementPut(net.sf.ehcache.Ehcache cache,
net.sf.ehcache.Element arg1)
throws net.sf.ehcache.CacheException
- Specified by:
notifyElementPut
in interface net.sf.ehcache.event.CacheEventListener
- Throws:
net.sf.ehcache.CacheException
notifyElementRemoved
public void notifyElementRemoved(net.sf.ehcache.Ehcache cache,
net.sf.ehcache.Element arg1)
throws net.sf.ehcache.CacheException
- Specified by:
notifyElementRemoved
in interface net.sf.ehcache.event.CacheEventListener
- Throws:
net.sf.ehcache.CacheException
notifyElementUpdated
public void notifyElementUpdated(net.sf.ehcache.Ehcache cache,
net.sf.ehcache.Element arg1)
throws net.sf.ehcache.CacheException
- Specified by:
notifyElementUpdated
in interface net.sf.ehcache.event.CacheEventListener
- Throws:
net.sf.ehcache.CacheException
notifyRemoveAll
public void notifyRemoveAll(net.sf.ehcache.Ehcache cache)
- Specified by:
notifyRemoveAll
in interface net.sf.ehcache.event.CacheEventListener
Copyright © 1999-2009 Apache Software Foundation. All Rights Reserved.