|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jetspeed.cache.impl.EhCacheImpl
org.apache.jetspeed.cache.impl.EhDecorationContentCacheImpl
public class EhDecorationContentCacheImpl
Wrapper around actual cache implementation
Field Summary | |
---|---|
static java.lang.String |
KEY_THEME_KEY
|
static int |
KEY_THEME_KEY_LENGTH
|
Fields inherited from class org.apache.jetspeed.cache.impl.EhCacheImpl |
---|
ehcache, localListeners, remoteListeners |
Constructor Summary | |
---|---|
EhDecorationContentCacheImpl(net.sf.ehcache.Cache ehcache,
ContentCacheKeyGenerator keyGenerator)
|
|
EhDecorationContentCacheImpl(net.sf.ehcache.Ehcache ehcache)
|
|
EhDecorationContentCacheImpl(net.sf.ehcache.Ehcache ehcache,
JetspeedCache preferenceCache)
|
|
EhDecorationContentCacheImpl(net.sf.ehcache.Ehcache ehcache,
JetspeedCache preferenceCache,
ContentCacheKeyGenerator keyGenerator)
|
Method Summary | |
---|---|
void |
clear()
clear all content in the cache |
ContentCacheKey |
createCacheKey(RequestContext context,
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 |
java.lang.String |
createSessionKey(RequestContext context)
Creates a session key used to store associated information in the session. |
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()
|
void |
invalidate(RequestContext context)
remove from the cache and invalidate any associated caches or session attributes |
boolean |
isKeyInCache(java.lang.Object key)
|
void |
notifyElementAdded(JetspeedCache cache,
boolean local,
java.lang.Object key,
java.lang.Object element)
ADDED notification for cache listeners |
void |
notifyElementChanged(JetspeedCache cache,
boolean local,
java.lang.Object key,
java.lang.Object element)
CHANGE notification for cache listeners |
void |
notifyElementEvicted(JetspeedCache cache,
boolean local,
java.lang.Object key,
java.lang.Object element)
EVICTED notification for cache listeners |
void |
notifyElementExpired(JetspeedCache cache,
boolean local,
java.lang.Object key,
java.lang.Object element)
EXPIRED notification for cache listeners |
void |
notifyElementRemoved(JetspeedCache cache,
boolean local,
java.lang.Object key,
java.lang.Object element)
REMOVE notification for cache listeners |
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 |
protected net.sf.ehcache.Element |
saveGet(java.lang.Object key)
|
Methods inherited from class org.apache.jetspeed.cache.impl.EhCacheImpl |
---|
addEventListener, clone, dispose, notifyListeners, removeEventListener, removeQuiet |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.jetspeed.cache.JetspeedCache |
---|
addEventListener, removeEventListener, removeQuiet |
Field Detail |
---|
public static final java.lang.String KEY_THEME_KEY
public static final int KEY_THEME_KEY_LENGTH
Constructor Detail |
---|
public EhDecorationContentCacheImpl(net.sf.ehcache.Ehcache ehcache, JetspeedCache preferenceCache, ContentCacheKeyGenerator keyGenerator)
public EhDecorationContentCacheImpl(net.sf.ehcache.Ehcache ehcache, JetspeedCache preferenceCache)
public EhDecorationContentCacheImpl(net.sf.ehcache.Ehcache ehcache)
public EhDecorationContentCacheImpl(net.sf.ehcache.Cache ehcache, ContentCacheKeyGenerator keyGenerator)
Method Detail |
---|
public void notifyElementAdded(JetspeedCache cache, boolean local, java.lang.Object key, java.lang.Object element)
JetspeedCacheEventListener
notifyElementAdded
in interface JetspeedCacheEventListener
cache
- the Cache repoorting the changelocal
- true if action was local, false if initiated by remote cachekey
- key of objectelement
- content of objectpublic void notifyElementChanged(JetspeedCache cache, boolean local, java.lang.Object key, java.lang.Object element)
JetspeedCacheEventListener
notifyElementChanged
in interface JetspeedCacheEventListener
cache
- the Cache repoorting the changelocal
- true if action was local, false if initiated by remote cachekey
- key of objectelement
- content of objectpublic void notifyElementEvicted(JetspeedCache cache, boolean local, java.lang.Object key, java.lang.Object element)
JetspeedCacheEventListener
notifyElementEvicted
in interface JetspeedCacheEventListener
cache
- the Cache repoorting the changelocal
- true if action was local, false if initiated by remote cachekey
- key of objectelement
- content of objectpublic void notifyElementExpired(JetspeedCache cache, boolean local, java.lang.Object key, java.lang.Object element)
JetspeedCacheEventListener
notifyElementExpired
in interface JetspeedCacheEventListener
cache
- the Cache repoorting the changelocal
- true if action was local, false if initiated by remote cachekey
- key of objectelement
- content of objectpublic void notifyElementRemoved(JetspeedCache cache, boolean local, java.lang.Object key, java.lang.Object element)
JetspeedCacheEventListener
notifyElementRemoved
in interface JetspeedCacheEventListener
cache
- the Cache repoorting the changelocal
- true if action was local, false if initiated by remote cachekey
- key of objectelement
- content of objectpublic CacheElement get(java.lang.Object key)
JetspeedCache
get
in interface JetspeedCache
get
in class EhCacheImpl
key
- The key used to find the object
public int getTimeToIdleSeconds()
getTimeToIdleSeconds
in interface JetspeedCache
getTimeToIdleSeconds
in class EhCacheImpl
public int getTimeToLiveSeconds()
getTimeToLiveSeconds
in interface JetspeedCache
getTimeToLiveSeconds
in class EhCacheImpl
public boolean isKeyInCache(java.lang.Object key)
isKeyInCache
in interface JetspeedCache
isKeyInCache
in class EhCacheImpl
public void put(CacheElement element)
JetspeedCache
put
in interface JetspeedCache
put
in class EhCacheImpl
public CacheElement createElement(java.lang.Object key, java.lang.Object content)
JetspeedCache
createElement
in interface JetspeedCache
createElement
in class EhCacheImpl
public boolean remove(java.lang.Object key)
JetspeedCache
remove
in interface JetspeedCache
remove
in class EhCacheImpl
public void evictContentForUser(java.lang.String username)
JetspeedCache
evictContentForUser
in interface JetspeedCache
evictContentForUser
in class EhCacheImpl
username
- unique user identifierpublic void evictContentForSession(java.lang.String session)
JetspeedCache
evictContentForSession
in interface JetspeedCache
evictContentForSession
in class EhCacheImpl
public void clear()
JetspeedCache
clear
in interface JetspeedCache
clear
in class EhCacheImpl
public ContentCacheKey createCacheKey(RequestContext context, java.lang.String windowId)
JetspeedCache
createCacheKey
in interface JetspeedCache
createCacheKey
in class EhCacheImpl
protected net.sf.ehcache.Element saveGet(java.lang.Object key)
public java.lang.String createSessionKey(RequestContext context)
JetspeedContentCache
createSessionKey
in interface JetspeedContentCache
public void invalidate(RequestContext context)
JetspeedContentCache
invalidate
in interface JetspeedContentCache
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |