|
||||||||||
| 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.EhPortletContentCacheImpl
public class EhPortletContentCacheImpl
Wrapper around actual cache implementation
| Field Summary | |
|---|---|
static java.lang.String |
KEY_ENTITY_KEY
|
static int |
KEY_ENTITY_KEY_LENGTH
|
| Fields inherited from class org.apache.jetspeed.cache.impl.EhCacheImpl |
|---|
ehcache, localListeners, remoteListeners |
| Constructor Summary | |
|---|---|
EhPortletContentCacheImpl(net.sf.ehcache.Ehcache ehcache)
|
|
EhPortletContentCacheImpl(net.sf.ehcache.Ehcache ehcache,
ContentCacheKeyGenerator keyGenerator)
|
|
EhPortletContentCacheImpl(net.sf.ehcache.Ehcache ehcache,
JetspeedCache preferenceCache)
|
|
EhPortletContentCacheImpl(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_ENTITY_KEY
public static final int KEY_ENTITY_KEY_LENGTH
| Constructor Detail |
|---|
public EhPortletContentCacheImpl(net.sf.ehcache.Ehcache ehcache,
JetspeedCache preferenceCache,
ContentCacheKeyGenerator keyGenerator)
public EhPortletContentCacheImpl(net.sf.ehcache.Ehcache ehcache,
JetspeedCache preferenceCache)
public EhPortletContentCacheImpl(net.sf.ehcache.Ehcache ehcache)
public EhPortletContentCacheImpl(net.sf.ehcache.Ehcache ehcache,
ContentCacheKeyGenerator keyGenerator)
| Method Detail |
|---|
public void notifyElementAdded(JetspeedCache cache,
boolean local,
java.lang.Object key,
java.lang.Object element)
JetspeedCacheEventListener
notifyElementAdded in interface JetspeedCacheEventListenercache - the Cache repoorting the changelocal - true if action was local, false if initiated by remote cachekey - key of objectelement - content of object
public void notifyElementChanged(JetspeedCache cache,
boolean local,
java.lang.Object key,
java.lang.Object element)
JetspeedCacheEventListener
notifyElementChanged in interface JetspeedCacheEventListenercache - the Cache repoorting the changelocal - true if action was local, false if initiated by remote cachekey - key of objectelement - content of object
public void notifyElementEvicted(JetspeedCache cache,
boolean local,
java.lang.Object key,
java.lang.Object element)
JetspeedCacheEventListener
notifyElementEvicted in interface JetspeedCacheEventListenercache - the Cache repoorting the changelocal - true if action was local, false if initiated by remote cachekey - key of objectelement - content of object
public void notifyElementExpired(JetspeedCache cache,
boolean local,
java.lang.Object key,
java.lang.Object element)
JetspeedCacheEventListener
notifyElementExpired in interface JetspeedCacheEventListenercache - the Cache repoorting the changelocal - true if action was local, false if initiated by remote cachekey - key of objectelement - content of object
public void notifyElementRemoved(JetspeedCache cache,
boolean local,
java.lang.Object key,
java.lang.Object element)
JetspeedCacheEventListener
notifyElementRemoved in interface JetspeedCacheEventListenercache - 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 JetspeedCacheget in class EhCacheImplkey - The key used to find the object
public int getTimeToIdleSeconds()
getTimeToIdleSeconds in interface JetspeedCachegetTimeToIdleSeconds in class EhCacheImplpublic int getTimeToLiveSeconds()
getTimeToLiveSeconds in interface JetspeedCachegetTimeToLiveSeconds in class EhCacheImplpublic boolean isKeyInCache(java.lang.Object key)
isKeyInCache in interface JetspeedCacheisKeyInCache in class EhCacheImplpublic void put(CacheElement element)
JetspeedCache
put in interface JetspeedCacheput in class EhCacheImpl
public CacheElement createElement(java.lang.Object key,
java.lang.Object content)
JetspeedCache
createElement in interface JetspeedCachecreateElement in class EhCacheImplpublic boolean remove(java.lang.Object key)
JetspeedCache
remove in interface JetspeedCacheremove in class EhCacheImplpublic void evictContentForUser(java.lang.String username)
JetspeedCache
evictContentForUser in interface JetspeedCacheevictContentForUser in class EhCacheImplusername - unique user identifierpublic void evictContentForSession(java.lang.String session)
JetspeedCache
evictContentForSession in interface JetspeedCacheevictContentForSession in class EhCacheImplpublic void clear()
JetspeedCache
clear in interface JetspeedCacheclear in class EhCacheImpl
public ContentCacheKey createCacheKey(RequestContext context,
java.lang.String windowId)
JetspeedCache
createCacheKey in interface JetspeedCachecreateCacheKey in class EhCacheImplprotected net.sf.ehcache.Element saveGet(java.lang.Object key)
public java.lang.String createSessionKey(RequestContext context)
JetspeedContentCache
createSessionKey in interface JetspeedContentCachepublic 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 | |||||||||