public interface JetspeedCache
Provides interface to Jetspeed for cache related activities Abstraction around actual cache implementation
Modifier and Type | Method and Description |
---|---|
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
|
ContentCacheKey |
createCacheKey(RequestContext rc,
String windowId)
Create a portlet content cache key based on dynamic request context information and a window id
|
CacheElement |
createElement(Object key,
Object content)
Create a cached element
|
void |
evictContentForSession(String sessionId)
Evict all cached content for the given session identifier
|
void |
evictContentForUser(String username)
Evict all cached content for the given username
|
CacheElement |
get(Object key)
Retrieve an object from the cache
|
List |
getKeys()
Returns a list of all elements in the cache, whether or not they are expired.
|
int |
getMaxSize()
get the maximum size of the cache
|
int |
getSize()
get the size of the cache
|
int |
getTimeToIdleSeconds() |
int |
getTimeToLiveSeconds() |
boolean |
isDistributed()
Returns whether this cache is currently part of a distributed cache cluster.
|
boolean |
isKeyInCache(Object key) |
void |
put(CacheElement object)
Put an object into the cache, adding it, or replacing if exists
|
boolean |
remove(Object key)
Remove an object from the cache
|
void |
removeEventListener(JetspeedCacheEventListener listener,
boolean local) |
boolean |
removeQuiet(Object key)
Remove object from cache, do not notify listeners
|
CacheElement get(Object key)
key
- The key used to find the objectvoid clear()
void put(CacheElement object)
object
- CacheElement createElement(Object key, Object content)
key
- content
- boolean isKeyInCache(Object key)
boolean remove(Object key)
key
- boolean removeQuiet(Object key)
key
- int getTimeToIdleSeconds()
int getTimeToLiveSeconds()
void evictContentForUser(String username)
username
- unique user identifiervoid evictContentForSession(String sessionId)
sessionId
- unique session identifierContentCacheKey createCacheKey(RequestContext rc, String windowId)
rc
- windowId
- void addEventListener(JetspeedCacheEventListener listener, boolean local)
listener
- local
- if true, listen to local events, if false, listen to remotevoid removeEventListener(JetspeedCacheEventListener listener, boolean local)
List getKeys()
int getSize()
boolean isDistributed()
int getMaxSize()
Copyright © 1999–2016 The Apache Software Foundation. All rights reserved.