Oracle Application Server 10g Java Object Cache API Reference
10g(9.0.4)

B10388-01

oracle.ias.cache
Class Configurator

java.lang.Object
  |
  +--oracle.ias.cache.Configurator

public class Configurator
extends java.lang.Object

Constructor Summary
Configurator(java.lang.String configFile)
          Construct a Configurator object based on the contents in a XML file.
Configurator(java.lang.String configFile, boolean loadDeclare)
           

 

Method Summary
 void defineDeclarable()
          Define the declarative Cache
 void defineDeclarable(boolean ignoreError)
          Define the declarative Cache
 oracle.ias.cache.CacheAttributes getCacheAttributes()
          Return the CacheAttributes defined in the configuration file
static void main(java.lang.String[] args)
          For testing purpose.
 java.lang.String toString()
          Return the description of the cache configuration and any declarable cached objects which are defined in the config file.
 void updateFile(oracle.ias.cache.CacheAttributes cattr)
          Update XML document and overwrite the existing config file based on the data in the specified CacheAttributes.

 

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait

 

Constructor Detail

Configurator

public Configurator(java.lang.String configFile)
             throws CacheConfigParsingException,
InvalidArgumentException,
CacheException
Construct a Configurator object based on the contents in a XML file. This Configurator object can be used for defining behaviour of the cache service and the cached elements such as Region, Group, Object, Attributes, etc.

After constructing this object, the user can retrieve the CacheAttritubes object and invoke the defineDeclarable method to define the declarative cache. During Cache service initialization, it automatically creates a Configurator object and define the Cache service if a XML config file is supplied to Cache.open(String filename).

Parameters:
configFile - is the XML configuration file
Throws:
CacheConfigParsingException - if there is any error during parsing the file
InvalidArgumentException
CacheException

Configurator

public Configurator(java.lang.String configFile,
                    boolean loadDeclare)
             throws CacheConfigParsingException,
InvalidArgumentException,
CacheException
Method Detail

getCacheAttributes

public oracle.ias.cache.CacheAttributes getCacheAttributes()
Return the CacheAttributes defined in the configuration file
Returns:
CacheAttributes. Null if the config file does not contain any cache configuration.

defineDeclarable

public void defineDeclarable(boolean ignoreError)
                      throws CacheException
Define the declarative Cache
Parameters:
ignoreError - is true for ignoring any error on duplicated declaration
Throws:
CacheException - if any error occurs

defineDeclarable

public void defineDeclarable()
                      throws CacheException
Define the declarative Cache
Throws:
CacheException - if any error occurs

updateFile

public void updateFile(oracle.ias.cache.CacheAttributes cattr)
                throws CacheConfigParsingException
Update XML document and overwrite the existing config file based on the data in the specified CacheAttributes.

This method only updating coordinator address list at the current moment.

Parameters:
cattr -
Throws:
CacheConfigParsingException - if any error occurs

toString

public java.lang.String toString()
Return the description of the cache configuration and any declarable cached objects which are defined in the config file.
Overrides:
toString in class java.lang.Object
Returns:
detail description

main

public static void main(java.lang.String[] args)
For testing purpose. Read the configuration file, parse it and dump the contents.
Parameters:
args - must contain the full path to the configuration file

Oracle Application Server 10g Java Object Cache API Reference
10g(9.0.4)

B10388-01

Copyright © 2003 Oracle Corporation. All Rights Reserved.