|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.seam.cache.CacheProvider<T>
public abstract class CacheProvider<T>
CacheProvider provides methods to control and manipulate the configured cache
Field Summary | |
---|---|
static String |
DEFAULT_REGION
the region name to be used if no region is specified |
Constructor Summary | |
---|---|
CacheProvider()
|
Method Summary | ||
---|---|---|
abstract void |
clear()
Removes all objects from all cache regions |
|
Object |
get(String key)
Fetches an object for the given key from the cache and returns it if found. |
|
|
get(String key,
E type)
Fetches an object for the given key from the cache and returns it if found. |
|
abstract Object |
get(String region,
String key)
Fetches an object for the given key from the cache and returns it if found. |
|
|
get(String region,
String key,
E type)
Fetches an object for the given key from the cache and returns it if found. |
|
String |
getConfiguration()
Get the configuration file used by the cache |
|
protected InputStream |
getConfigurationAsStream()
|
|
String |
getDefaultRegion()
|
|
abstract T |
getDelegate()
|
|
static CacheProvider |
instance()
|
|
static
|
instance(Class<? extends T> type)
|
|
void |
put(String key,
Object object)
Put an object into the cache. |
|
abstract void |
put(String region,
String key,
Object object)
Puts an object into the cache. |
|
void |
remove(String key)
Removes an object from the cache. |
|
abstract void |
remove(String region,
String key)
Removes an object from the cache. |
|
void |
setConfiguration(String cfgResourceName)
Set the configuration file to be used by the cache |
|
void |
setDefaultRegion(String defaultRegion)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String DEFAULT_REGION
Constructor Detail |
---|
public CacheProvider()
Method Detail |
---|
public abstract T getDelegate()
public String getConfiguration()
protected InputStream getConfigurationAsStream()
public void setConfiguration(String cfgResourceName)
public Object get(String key)
key
- - a key to identify the object.
public <E> E get(String key, E type)
key
- - a key to identify the object.type
- - the type of the object to return
public abstract Object get(String region, String key)
region
- - the name of a cache regionkey
- - a key to identify the object.
public <E> E get(String region, String key, E type)
region
- - the name of a cache regionkey
- - a key to identify the object.type
- - the type of object to return
public void put(String key, Object object)
key
- - a key to identify the objectobject
- - the object to be stored in the cachepublic abstract void put(String region, String key, Object object)
region
- - the name of a cache regionkey
- - a key to identify the objectobject
- - the object to be stored in the cachepublic void remove(String key)
key
- - a key to identify the objectpublic abstract void remove(String region, String key)
region
- - the name of a cache regionkey
- - a key to identify the objectpublic abstract void clear()
public String getDefaultRegion()
public void setDefaultRegion(String defaultRegion)
public static CacheProvider instance()
public static <T> CacheProvider<T> instance(Class<? extends T> type)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |