|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.jetspeed.cache.impl.EhCacheImpl
public class EhCacheImpl
| Field Summary | |
|---|---|
protected net.sf.ehcache.Ehcache |
ehcache
|
protected java.util.List |
localListeners
|
protected java.util.List |
remoteListeners
|
| Constructor Summary | |
|---|---|
EhCacheImpl(net.sf.ehcache.Ehcache ehcache)
|
|
| Method Summary | |
|---|---|
void |
addEventListener(JetspeedCacheEventListener listener,
boolean local)
Add a cache listener for supported cache events, either for local or remote cache events |
void |
clear()
clear all content in the cache |
java.lang.Object |
clone()
|
ContentCacheKey |
createCacheKey(RequestContext rc,
java.lang.String windowId)
Create a portlet content cache key based on dynamic request context information and a window id |
CacheElement |
createElement(java.lang.Object key,
java.lang.Object content)
Create a cached element |
void |
dispose()
|
void |
evictContentForSession(java.lang.String session)
Evict all cached content for the given session identifier |
void |
evictContentForUser(java.lang.String username)
Evict all cached content for the given username |
CacheElement |
get(java.lang.Object key)
Retrieve an object from the cache |
int |
getTimeToIdleSeconds()
|
int |
getTimeToLiveSeconds()
|
boolean |
isKeyInCache(java.lang.Object key)
|
protected void |
notifyListeners(boolean local,
int action,
java.lang.Object key,
java.lang.Object value)
|
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 |
void |
removeEventListener(JetspeedCacheEventListener listener,
boolean local)
|
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 |
| Field Detail |
|---|
protected net.sf.ehcache.Ehcache ehcache
protected java.util.List localListeners
protected java.util.List remoteListeners
| Constructor Detail |
|---|
public EhCacheImpl(net.sf.ehcache.Ehcache ehcache)
| Method Detail |
|---|
public CacheElement get(java.lang.Object key)
JetspeedCache
get in interface JetspeedCachekey - The key used to find the object
public int getTimeToIdleSeconds()
getTimeToIdleSeconds in interface JetspeedCachepublic int getTimeToLiveSeconds()
getTimeToLiveSeconds in interface JetspeedCachepublic boolean isKeyInCache(java.lang.Object key)
isKeyInCache in interface JetspeedCachepublic void put(CacheElement element)
JetspeedCache
put in interface JetspeedCache
public CacheElement createElement(java.lang.Object key,
java.lang.Object content)
JetspeedCache
createElement in interface JetspeedCachepublic boolean remove(java.lang.Object key)
JetspeedCache
remove in interface JetspeedCachepublic boolean removeQuiet(java.lang.Object key)
JetspeedCache
removeQuiet in interface JetspeedCachepublic void clear()
JetspeedCache
clear in interface JetspeedCachepublic void evictContentForUser(java.lang.String username)
JetspeedCache
evictContentForUser in interface JetspeedCacheusername - unique user identifierpublic void evictContentForSession(java.lang.String session)
JetspeedCache
evictContentForSession in interface JetspeedCache
public void addEventListener(JetspeedCacheEventListener listener,
boolean local)
JetspeedCache
addEventListener in interface JetspeedCachelocal - if true, listen to local events, if false, listen to remote
public void removeEventListener(JetspeedCacheEventListener listener,
boolean local)
removeEventListener in interface JetspeedCache
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in class java.lang.Objectjava.lang.CloneNotSupportedExceptionpublic void dispose()
protected void notifyListeners(boolean local,
int action,
java.lang.Object key,
java.lang.Object value)
public ContentCacheKey createCacheKey(RequestContext rc,
java.lang.String windowId)
JetspeedCache
createCacheKey in interface JetspeedCache
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||