javax.util.jcache
Class CacheAccessFactory

java.lang.Object
  extended by javax.util.jcache.CacheAccessFactory
Direct Known Subclasses:
CacheAccessFactoryImpl

public abstract class CacheAccessFactory
extends Object

A factory for CacheAccess objects and to the Cache Administrative interface.

Author:
Frank Karlstrøm

Constructor Summary
protected CacheAccessFactory()
          Creates a new CacheAccessFactory object.
 
Method Summary
abstract  void defineRegion(String name)
          Deprecated. removed auto-generate-region replacement.
abstract  void defineRegion(String name, Attributes attributes)
          Deprecated. removed auto-generate-region replacement.
abstract  Cache getCache()
          Deprecated. will be removed with no replacement.
abstract  Cache getCache(boolean b)
          Deprecated. will be removed with no replacement.
 Attributes getDefaultAttributes()
          Deprecated. removed with no replacement.
static CacheAccessFactory getInstance()
          Obtain a new instance of a CacheAccessFactory.
abstract  CacheMap getMapAccess()
           
abstract  CacheMap getMapAccess(String region)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CacheAccessFactory

protected CacheAccessFactory()
Creates a new CacheAccessFactory object.

Method Detail

getDefaultAttributes

public Attributes getDefaultAttributes()
Deprecated. removed with no replacement.

returns the default Attributes

Returns:
the default Attributes

getInstance

public static CacheAccessFactory getInstance()
Obtain a new instance of a CacheAccessFactory. This static method creates a new factory instance. This method uses the following ordered lookup procedure to determine the CacheAccessFactory implementation class to load:

Returns:
an instance of a CacheAccessFactory.
Throws:
IllegalStateException - if the implementation is not available or cannot be instantiated.

defineRegion

public abstract void defineRegion(String name)
                           throws ObjectExistsException,
                                  NullObjectNameException,
                                  CacheNotAvailableException
Deprecated. removed auto-generate-region replacement.

Will create a named region within the cache. This defines a namespace for storing objects. Gets it default attributes from the properties file.

Parameters:
name - the name for the region. Must be globally unique.
Throws:
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.

defineRegion

public abstract void defineRegion(String name,
                                  Attributes attributes)
                           throws ObjectExistsException,
                                  NullObjectNameException,
                                  CacheNotAvailableException
Deprecated. removed auto-generate-region replacement.

Will create a named region within the cache. This defines a namespace for storing objects.

Parameters:
name - the name for the region. Must be globally unique.
attributes - sets the default attributes for objects in the new region. If the Attributes is null, default attributes will be used.
Throws:
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.

getCache

public abstract Cache getCache()
                        throws CacheException
Deprecated. will be removed with no replacement.

Gets the Cache which contains several usefull administraion methods.

Returns:
A Cache object wich is initialized.
Throws:
CacheException - if exceptions occur.

getCache

public abstract Cache getCache(boolean b)
                        throws CacheException
Deprecated. will be removed with no replacement.

Will get the Cache instance.

Parameters:
b - a boolean indicating wether to initialize the Cache or not. if already initialized, this is ignored.
Returns:
the Cache instance.
Throws:
CacheException - if fatal exceptions occur.

getMapAccess

public abstract CacheMap getMapAccess()
                               throws CacheException
Throws:
CacheException

getMapAccess

public abstract CacheMap getMapAccess(String region)
                               throws CacheException
Throws:
CacheException


Copyright © 2002-2009 Hosted by SourceForge. All Rights Reserved.