|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.util.jcache.CacheAccessFactory
org.fjank.jcache.CacheAccessFactoryImpl
public final class CacheAccessFactoryImpl
A factory for CacheAccess objects.
Constructor Summary | |
---|---|
CacheAccessFactoryImpl()
Creates a new CacheAccessFactoryImpl object. |
Method Summary | |
---|---|
void |
defineRegion(String name)
Will create a named region within the cache. |
void |
defineRegion(String name,
Attributes attributes)
Will create a named region within the cache. |
Cache |
getCache()
gets an initialized instance of the cache. |
Cache |
getCache(boolean init)
gets an instance of the cache. |
CacheMap |
getMapAccess()
A method to retrieve a Map based implementation of a CacheAccess to the default region. |
CacheMap |
getMapAccess(String region)
A method to retrieve a Map based implementation of a CacheAccess to the specified region. |
Methods inherited from class javax.util.jcache.CacheAccessFactory |
---|
getDefaultAttributes, getInstance |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CacheAccessFactoryImpl()
Method Detail |
---|
public void defineRegion(String name) throws ObjectExistsException, NullObjectNameException, CacheNotAvailableException
defineRegion
in class CacheAccessFactory
name
- the name for the region. Must be globally unique.
ObjectExistsException
- if the name already exists in the cache.
NullObjectNameException
- if the region is attempted initialized
with null
as name.
CacheNotAvailableException
- if the cache is not available, either
it is not initialized, or it is unavailable.public void defineRegion(String name, Attributes attributes) throws ObjectExistsException, NullObjectNameException, CacheNotAvailableException
defineRegion
in class CacheAccessFactory
name
- the name for the region. Must be globally unique.attributes
- sets the default attributes for objects in the new
region.
ObjectExistsException
- if the name already exists in the cache.
NullObjectNameException
- if the region is attempted initialized
with null
as name.
CacheNotAvailableException
- if the cache is not available, either
it is not initialized, or it is unavailable.public CacheMap getMapAccess()
getMapAccess
in class CacheAccessFactory
public CacheMap getMapAccess(String region)
getMapAccess
in class CacheAccessFactory
public Cache getCache() throws CacheException
getCache
in class CacheAccessFactory
CacheException
- if exceptions occur.CacheAccessFactory.getCache()
public Cache getCache(boolean init) throws CacheException
getCache
in class CacheAccessFactory
init
- a boolean indicating wether to initialize the Cache or not. if
already initialized, this is ignored.
CacheException
- if fatal exceptions occur.CacheAccessFactory.getCache(boolean)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |