|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ICacheManager
Field Summary | |
---|---|
static java.lang.String |
GLOBAL
|
static java.lang.String |
SESSION
|
Method Summary | |
---|---|
boolean |
addCacheRegion(java.lang.String region)
|
boolean |
addCacheRegion(java.lang.String region,
java.util.Properties cacheProperties)
|
boolean |
cacheEnabled()
Returns the enablement state of the cache. |
boolean |
cacheEnabled(java.lang.String region)
Returns the enablement state of the cache. |
void |
cacheStop()
Stops the cache by calling the cacheProvider stop method. |
void |
clearCache()
Entirely clears the cache. |
void |
clearRegionCache(java.lang.String region)
Clears any data for the specified for a specific region(For example region could be session, global etc) |
java.util.Set |
getAllEntriesFromRegionCache(java.lang.String region)
Get a Set of Map.Entry objects from the cache within a specific region |
java.util.Set |
getAllKeysFromRegionCache(java.lang.String region)
Get a Set of Key objects from the cache within a specific region |
java.util.List |
getAllValuesFromRegionCache(java.lang.String region)
Get a list of values from the cache within a specific region |
java.lang.Object |
getFromGlobalCache(java.lang.Object key)
Gets an object from the cache without translating the passed in key. |
java.lang.Object |
getFromRegionCache(java.lang.String region,
java.lang.Object key)
Gets an object from the cache within a specific region |
java.lang.Object |
getFromSessionCache(IPentahoSession session,
java.lang.String key)
Gets an object from the user session specific cache. |
void |
killSessionCache(IPentahoSession session)
Removes any session-based data for the specified IPentahoSession . |
void |
killSessionCaches()
Removes all cached items that are session-based. |
void |
onLogout(IPentahoSession session)
|
void |
putInGlobalCache(java.lang.Object key,
java.lang.Object value)
Puts an object directly into the cache without translating the passed in key. |
void |
putInRegionCache(java.lang.String reqion,
java.lang.Object key,
java.lang.Object value)
Puts an object directly into the cache of a specific region |
void |
putInSessionCache(IPentahoSession session,
java.lang.String key,
java.lang.Object value)
Puts an object in the session-specific cache. |
void |
removeFromGlobalCache(java.lang.Object key)
Removes an object from the cache |
void |
removeFromRegionCache(java.lang.String region,
java.lang.Object key)
Removes an object from the cache within a specific region |
void |
removeFromSessionCache(IPentahoSession session,
java.lang.String key)
Removes a data item from the user session specific cache |
void |
removeRegionCache(java.lang.String region)
Clears any data for the specified for a specific region(For example region could be session, global etc) and removed the region from the map |
Field Detail |
---|
static final java.lang.String SESSION
static final java.lang.String GLOBAL
Method Detail |
---|
void cacheStop()
void killSessionCache(IPentahoSession session)
IPentahoSession
.
session
- The session whose objects needs to be removed from the cache.void killSessionCaches()
void putInSessionCache(IPentahoSession session, java.lang.String key, java.lang.Object value)
Take special care that, in a TestCase, you don't have multiple
StandaloneSession objects with the same session key. Consider using
UUIDUtil
to generate a unique sessionId for each
standalone session.
session
- The users IPentahoSessionkey
- The key by which you want to retrieve the data back outvalue
- The data item to place into the cachevoid clearCache()
void removeFromSessionCache(IPentahoSession session, java.lang.String key)
session
- The users IPentahoSessionkey
- The key that maps to the value needing removedjava.lang.Object getFromSessionCache(IPentahoSession session, java.lang.String key)
session
- The users IPentahoSessionkey
- The key that maps to the data to get from the cache
boolean cacheEnabled()
void putInGlobalCache(java.lang.Object key, java.lang.Object value)
Important note - most cache implementations require both the key and the value to be serializable.
key
- Object by which the data is indexedvalue
- The data to store in the cache.java.lang.Object getFromGlobalCache(java.lang.Object key)
key
- The key that the data object was stored with
void removeFromGlobalCache(java.lang.Object key)
key
- The key that the data object was stored withboolean cacheEnabled(java.lang.String region)
void onLogout(IPentahoSession session)
onLogout
in interface ILogoutListener
session
- Performs any logout actions based on this session.boolean addCacheRegion(java.lang.String region)
boolean addCacheRegion(java.lang.String region, java.util.Properties cacheProperties)
void clearRegionCache(java.lang.String region)
region
- The region whose objects needs to be removed from the cache.void removeRegionCache(java.lang.String region)
region
- The region whose objects needs to be removed from the cache.void putInRegionCache(java.lang.String reqion, java.lang.Object key, java.lang.Object value)
Important note - most cache implementations require both the key and the value to be serializable.
region
- the region where the object will be put in the cachekey
- Object by which the data is indexedvalue
- The data to store in the cache.java.lang.Object getFromRegionCache(java.lang.String region, java.lang.Object key)
region
- the region where the object was put in the cachekey
- The key that the data object was stored with
java.util.Set getAllEntriesFromRegionCache(java.lang.String region)
region
- the region where the object was put in the cache
java.util.Set getAllKeysFromRegionCache(java.lang.String region)
region
- the region where the object was put in the cache
java.util.List getAllValuesFromRegionCache(java.lang.String region)
region
- the region where the object was put in the cache
void removeFromRegionCache(java.lang.String region, java.lang.Object key)
region
- the region where the object was put in the cachekey
- The key that the data object was stored with
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |