public abstract class PortalCache extends Object
Modifier and Type | Field and Description |
---|---|
protected static boolean |
allowSetCacheClass
remember if the cacheClass has already been set to prevent
re-initialisation
|
protected static Class |
cacheClass |
protected static Constructor |
cacheClassConstructor |
protected static boolean |
disableCache
Defines if cache is disabled.
|
protected String |
region |
Constructor and Description |
---|
PortalCache(String region)
create an instance for the given region
|
Modifier and Type | Method and Description |
---|---|
abstract void |
clear()
clears the whole cache
|
abstract void |
clearGroup(String groupName)
clears the a group in the cache
|
abstract Object |
get(Object key)
retrieve an object from the cache
|
static PortalCache |
getCache(String region)
retrieve a PortalCache instance
|
abstract PortalCacheAttributes |
getCacheAttributes(Object key)
get the cache attributes for a cached entry.
|
abstract PortalCacheAttributes |
getCacheAttributes(String groupName,
Object key)
get the cache attributes for a cached entry in a group.
|
abstract Object |
getFromGroup(String groupName,
Object key)
Retrieven an object from the group in the cache
|
abstract void |
put(Object key,
Object object)
put an object into the cache
|
abstract void |
put(Object key,
Object object,
PortalCacheAttributes attribs)
put an object into the cache, using some attributes to define caching
methods.
|
abstract void |
putIntoGroup(String groupName,
Object key,
Object object)
Put an object into a group of the cache
|
abstract void |
putIntoGroup(String groupName,
Object key,
Object object,
PortalCacheAttributes attribs)
put an object into the a group in the cache, using some attributes to
define caching methods.
|
abstract void |
remove(Object key)
remove an object from the cache
|
abstract void |
removeFromGroup(String groupName,
Object key)
remove an object from a group in the cache
|
static void |
setCacheClass(String cacheClass)
sets the cache class to be used
|
protected static Constructor cacheClassConstructor
protected String region
protected static boolean disableCache
protected static Class cacheClass
protected static boolean allowSetCacheClass
public PortalCache(String region)
region
- cache regionpublic static PortalCache getCache(String region) throws PortalCacheException
region
- cache regionPortalCacheException
public static void setCacheClass(String cacheClass) throws PortalCacheException
cacheClass
- to be used, null for default implementationPortalCacheException
public abstract Object get(Object key) throws PortalCacheException
key
- of the objectPortalCacheException
public abstract Object getFromGroup(String groupName, Object key) throws PortalCacheException
groupName
- group namekey
- key of the objectPortalCacheException
public abstract void put(Object key, Object object) throws PortalCacheException
key
- of the objectobject
- to put inside the cachePortalCacheException
public abstract void putIntoGroup(String groupName, Object key, Object object) throws PortalCacheException
groupName
- name of the groupkey
- key of the objectobject
- from the cache or nullPortalCacheException
public abstract void put(Object key, Object object, PortalCacheAttributes attribs) throws PortalCacheException
key
- the key of the entry.object
- the object to put inside the cache.attribs
- the cache element attributes for the object.PortalCacheException
public abstract void putIntoGroup(String groupName, Object key, Object object, PortalCacheAttributes attribs) throws PortalCacheException
groupName
- group namekey
- the key of the entry.object
- the object to put inside the cache.attribs
- the cache element attributes for the object.PortalCacheException
public abstract PortalCacheAttributes getCacheAttributes(Object key) throws PortalCacheException
key
- the key of the entry.PortalCacheException
public abstract PortalCacheAttributes getCacheAttributes(String groupName, Object key) throws PortalCacheException
groupName
- group namekey
- the key of the entry.PortalCacheException
public abstract void remove(Object key) throws PortalCacheException
key
- of object to be removedPortalCacheException
public abstract void removeFromGroup(String groupName, Object key) throws PortalCacheException
groupName
- group namekey
- of object to be removedPortalCacheException
public abstract void clear() throws PortalCacheException
PortalCacheException
public abstract void clearGroup(String groupName) throws PortalCacheException
groupName
- group namePortalCacheException
Copyright © 2015 Gentics Software GmbH. All Rights Reserved.