|
Oracle Application Server Java Object Cache API Reference 10g Release 2 (10.1.2) B14018-02 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.ias.cache.CacheAccess
CacheAccess provides a public API to access the cache. The CacheAccess object is associated with a region and can be used to access any object in that region. CacheAccess is not thread safe, which means if multiple threads are going to access the cache concurrently, each thread should instantiate its own CacheAccess instance.
Method Summary | |
void |
cancelResponse() terminates the request for a reply from the previous invalidate or update. |
void |
close() releases the resource used by current CacheAccess object. |
void |
createPool(java.lang.String name, PoolInstanceFactory factory, Attributes attr, int min, int max) creates an object pool containing at least min instances of the object created by calling factory.createInstance(). |
void |
createPool(java.lang.String name, java.lang.String group, PoolInstanceFactory factory, Attributes attr, int min, int max) creates an object pool containing at least min instances of the object created by calling factory.createInstance(). |
void |
defineGroup(java.lang.String name) is used to create a new group within the context of the region referred to the CacheAccess object. |
void |
defineGroup(java.lang.String name, Attributes attr) is used to create a new group within the context of the region referred to the CacheAccess object. |
void |
defineGroup(java.lang.String name, java.lang.String group) is used to create a new group within the context of the region referred to the CacheAccess object and associated with the group specified. |
void |
defineGroup(java.lang.String name, java.lang.String group, Attributes attr) is used to create a new group within the context of the region referred to the CacheAccess object and associated with the group specified. |
void |
defineObject(java.lang.Object name, Attributes attr) is used to specify the attributes to associate with an object when it is loaded. |
void |
defineObject(java.lang.Object name, java.lang.String group, Attributes attr) is used to specify the attributes to associate with an object when it is loaded. |
static void |
defineRegion(java.lang.String region) creates a named region within the cache. |
static void |
defineRegion(java.lang.String region, Attributes attr) creates a named region within the cache. |
void |
defineSubRegion(java.lang.String name) is used to define a new subRegion within the context of the region referred to the CacheAccess object. |
void |
defineSubRegion(java.lang.String name, Attributes attr) is used to define a new subRegion within the context of the region referred to the CacheAccess object. |
void |
destroy() destroys all objects associated with the current region including the region. |
void |
destroy(boolean localOnly) destroys all objects associated with the current region including the region. |
void |
destroy(java.lang.Object name) invalidates all objects associated with name, removing all references to the objects from the cache. |
void |
destroy(java.lang.Object[] names) invalidates all objects associated with the array of names, removing all references to the objects from the cache. |
void |
destroy(java.lang.Object[] names, boolean localOnly) invalidates all objects associated with the array of names, removing all references to the objects from the cache. |
void |
destroy(java.lang.Object name, boolean localOnly) invalidates all objects associated with name, removing all references to the objects from the cache. |
void |
disable() invalidates all the objects in the region and marks all the groups in the region and the region itself as DISABLED. |
void |
disable(java.lang.Object name) invalidates all the objects within the scope of the name and marks all the groups, regions and subregions within the scope of the name as DISABLED. |
void |
enable() Re-enables the current region, including all the cache objects, groups and subregions in the region. |
void |
enable(java.lang.Object name) re-enables the objects, groups, and subregions within the scope of the name. |
java.lang.Object |
get(java.lang.Object name) returns a reference to the object associated with name. |
java.lang.Object |
get(java.lang.Object name, java.lang.Object args) returns a reference to the object associated with name. |
java.lang.Object |
get(java.lang.Object name, java.lang.String group, java.lang.Object args) returns a reference to the object associated with name. |
static CacheAccess |
getAccess() is a static method that returns a CacheAccess object to the default region. |
static CacheAccess |
getAccess(java.lang.String region) is a static method that returns a CacheAccess object allowing access to the specified cache region. |
static CacheAccess |
getAccess(java.lang.String region, Attributes attr, boolean subRegion) is a static method that returns a CacheAccess object allowing access to the specified cache region. |
static CacheAccess |
getAccess(java.lang.String region, boolean checkRegion) is a static method that returns a CacheAccess object allowing access to the specified cache region. |
AggregateStatus |
getAggregateStatus() returns an aggregate status object describing the aggregate status associated with the group or region name. |
AggregateStatus |
getAggregateStatus(java.lang.Object name) returns an aggregate status object describing the aggregate status associated with the group or region name. |
java.util.Vector |
getAllCached(java.lang.Object name, int timeout) returns a Vector of instances of the named object from all the caches in the distributed system. |
java.util.Vector |
getAllCached(java.lang.Object name, int timeout, boolean ignoreRemoteEx) returns a Vector of instances of the named object from all the caches in the distributed system. |
Attributes |
getAttributes() returns an attribute object describing the current region. |
Attributes |
getAttributes(java.lang.Object name) returns an attribute object describing the current attributes associated with the object name (can be a group). |
int |
getCount() returns the current total count of objects for this region including objects in subRegions |
static java.lang.String |
getDefRegionName() returns the name of the default Region. |
java.lang.Object |
getOwnership(int timeout) claims the ownership of the region, if the region has been defined as "SYNCHRONIZE". |
java.lang.Object |
getOwnership(java.lang.Object name, int timeout) claims the ownership of the object with specified name for this CacheAccess instance, if the object has been defined as "SYNCHRONIZE". |
java.lang.Object |
getOwnership(java.lang.Object name, java.lang.String group, int timeout) claims the ownership of the object with specified name for this CacheAccess instance, if the object has been defined as "SYNCHRONIZE". |
java.lang.String |
getParent() returns the name of the parent region if any. |
PoolAccess |
getPool(java.lang.String name) returns a PoolAccess object associated with the object name. |
java.lang.String |
getRegionName() returns the name of the current region of the CacheAccess object. |
ObjectStatus |
getStatus() returns an status object describing the current status associated with the object name (can be a group). |
ObjectStatus |
getStatus(java.lang.Object name) returns an status object describing the current status associated with the object name (can be a group). |
CacheAccess |
getSubRegion(java.lang.String name) getSubRegion will return a CacheAccess object associated with the named subRegion. |
CacheAccess |
getSubRegion(java.lang.String name, Attributes attr) getSubRegion will return a CacheAccess object associated with the named subRegion. |
void |
invalidate() marks all objects within the region as invalid. |
void |
invalidate(boolean localOnly) marks all objects within the region as invalid. |
void |
invalidate(java.lang.Object name) marks all objects within the scope of name as invalid. |
void |
invalidate(java.lang.Object[] names) marks all objects within the scope of names as invalid. |
void |
invalidate(java.lang.Object[] names, boolean localOnly) marks all objects within the scope of names as invalid. |
void |
invalidate(java.lang.Object name, boolean localOnly) marks all objects within the scope of name as invalid. |
boolean |
isDisabled() returns a boolean to indicate if the region, which this cache access is referencing, is disabled or not. |
boolean |
isDisabled(java.lang.Object name) returns a boolean to indicate if the cache entity (region, group or object) identified by Object "name" is disabled. |
boolean |
isPresent(java.lang.Object name) returns true if the named object currently exists in the cache false otherwise. |
java.lang.Object[] |
listNames() returns a list of the names of all objects in this region This list is only the names of the objects, it doesn't obtain a reference to the object. |
java.util.Enumeration |
listObjects() returns an Enumeration that will allow access to the objects in the region. |
java.lang.String[] |
listRegions() returns an array of all subRegions in this region The list contains only the subRegions in the region itself, it does not contain subRegions in subRegions of the region. |
void |
loadList(java.lang.Object[] name) load an array of objects into the cache. |
void |
loadList(java.lang.Object[] name, java.lang.Object args) load an array of objects into the cache. |
void |
loadList(java.lang.Object[] name, java.lang.String group, java.lang.Object args) load an array of objects into the cache. |
void |
preLoad(java.lang.Object name) allows for asynchronous loading of objects into the cache. |
void |
preLoad(java.lang.Object name, java.lang.Object args) allows for asynchronous loading of objects into the cache. |
void |
preLoad(java.lang.Object name, java.lang.String group, java.lang.Object args) allows for asynchronous loading of objects into the cache. |
void |
put(java.lang.Object name, Attributes attr, java.lang.Object obj) allows a new object to be placed into the cache identified by name. |
void |
put(java.lang.Object name, java.lang.Object obj) allows a new object to be placed into the cache identified by name. |
void |
put(java.lang.Object name, java.lang.String group, java.lang.Object obj) allows a new object to be placed into the cache identified by name. |
void |
put(java.lang.Object name, java.lang.String group, java.lang.Object obj, Attributes attr) allows a new object to be placed into the cache identified by name. |
void |
releaseOwnership(int timeout) is used to explicitly give up ownership of the region. |
void |
releaseOwnership(java.lang.Object name, int timeout) is used to explicitly give up ownership of the named object. |
java.lang.Object |
replace(java.lang.Object name, java.lang.Object obj) creates a new version of the object identified by name, replacing the current version with the object obj. |
java.lang.Object |
replace(java.lang.Object name, java.lang.String group, java.lang.Object obj) creates a new version of the object identified by name, replacing the current version with the object obj. |
void |
replaceRemote(java.lang.Object name, java.lang.Object obj, oracle.ias.cache.CacheAddress addr) creates a new version of the object identified by name,in a remote cache, replacing the current version with the object obj. |
void |
replaceRemote(java.lang.Object name, java.lang.String group, java.lang.Object obj, oracle.ias.cache.CacheAddress addr) creates a new version of the object identified by name,in a remote cache, replacing the current version with the object obj. |
void |
resetAttributes(Attributes attr) allows for some of the attributes of a region to be reset, in particular: expiration time, time to live, default time to live, idle time, and event handlers. |
void |
resetAttributes(java.lang.Object name, Attributes attr) allows for some of the attributes of the named object to be reset, in particular: expiration time, time to live, default time to live, idle time, and event handlers. |
void |
save() causes all the objects within the scope of region to be saved to the disk cache. |
void |
save(java.lang.Object objname) causes all the objects within the scope of name to be saved to the disk cache. |
void |
spool(java.lang.Object objname) causes the object to be spooled to disk If the object is not serializable a CacheException will be logged. |
java.lang.String |
toString() String representation of this object |
void |
waitForResponse(int timeout) is used to wait for replies returned from invalidates or updates when a reply is requested. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
public static void defineRegion(java.lang.String region, Attributes attr) throws CacheNotAvailableException, oracle.ias.cache.NullObjectNameException, oracle.ias.cache.ObjectExistsException, CacheException
javacache.properties
. If the properties file is not found, default values will be used. Once a region is created, you may call getAccess(region)
to obtain an instance of a CacheAccess object to access the region.region
- The name of a region. It must be globally unique.attr
- Default Attributes of the region. This parameter can be null, if not setting any attributes to a region.oracle.ias.cache.ObjectExistsException
- if the specified region already exists.oracle.ias.cache.NullObjectNameException
- if the region name is null.CacheNotAvailableException
- if it cannot initialize the Cache Service.CacheException
getAccess
, Attributes
, CacheAttributes
public static void defineRegion(java.lang.String region) throws CacheNotAvailableException, oracle.ias.cache.NullObjectNameException, oracle.ias.cache.ObjectExistsException, CacheException
javacache.properties
. If the properties file is not found, default values will be used. Once a region is created, you may call getAccess(region)
to obtain an instance of a CacheAccess object to access the region.region
- The name of a region. It must be globally unique.oracle.ias.cache.ObjectExistsException
- if the specified region already exists.oracle.ias.cache.NullObjectNameException
- if the region name is null.CacheNotAvailableException
- if it cannot initialize the Cache Service.CacheException
getAccess
, Attributes
, CacheAttributes
public static CacheAccess getAccess() throws CacheException
CacheNotAvailableException
- is thrown if the Cache Service cannot be initialized.CacheException
getAccess
, defineRegion
, close
public static CacheAccess getAccess(java.lang.String region) throws CacheNotAvailableException
region
- Name of an existing region. Call defineRegion to create a region first.CacheNotAvailableException
- is thrown if the Cache Service cannot be initialized.getAccess
, defineRegion
, close
public static CacheAccess getAccess(java.lang.String region, boolean checkRegion) throws CacheNotAvailableException, oracle.ias.cache.RegionNotFoundException, CacheException
region
- Name of an existing region. Call defineRegion to create a region first.checkRegion
- Set TRUE for checking the existance of the specified region. If this flag is set as TRUE and the region does not exist, a RegionNotFoundException will be thrown.CacheNotAvailableException
- is thrown if the Cache Service cannot be initialized.oracle.ias.cache.RegionNotFoundException
- is thrown if the region does not exist and checkRegion is TRUE.CacheException
getAccess
, defineRegion
, close
public static CacheAccess getAccess(java.lang.String region, Attributes attr, boolean subRegion) throws CacheNotAvailableException, oracle.ias.cache.RegionNotFoundException, CacheException
region
- Name of the region to accessattr
- Attributes to set for the regionsubRegion
- indicates the region is a subRegion so the name should be interrupted as a hierarchy rather than a single region nameCacheNotAvailableException
- is thrown if the Cache Service cannot be initialized.oracle.ias.cache.RegionNotFoundException
CacheException
getAccess
, defineRegion
, close
public void defineObject(java.lang.Object name, Attributes attr) throws CacheException
name
- Name of a object to be definedattr
- Attributes of the object.CacheException
- if any cache error occurs.Attributes
, defineGroup
public void defineObject(java.lang.Object name, java.lang.String group, Attributes attr) throws CacheException
name
- Name of a object to be definedgroup
- Name of a parent group where the new object belongs to.attr
- Attributes of the object.CacheException
- if any cache error occurs.Attributes
, defineGroup
public void resetAttributes(Attributes attr) throws CacheException, InvalidHandleException
attr
- Attributes of the object.CacheException
- if any cache error occurs.InvalidHandleException
Attributes
, defineGroup
public void resetAttributes(java.lang.Object name, Attributes attr) throws CacheException, InvalidHandleException
name
- Name of a object to be definedattr
- Attributes of the object.CacheException
- if any cache error occurs.InvalidHandleException
Attributes
, defineGroup
public java.lang.Object get(java.lang.Object name) throws oracle.ias.cache.ObjectNotFoundException, NotARetrievableObjectException, oracle.ias.cache.RegionNotFoundException, InvalidHandleException, CacheException
name
- An unique name of the object in the Cache within the region specified by the current CacheAccess. The name Object must implement the equals and hashCode methods.Object
A reference to the object associated with a nameoracle.ias.cache.ObjectNotFoundException
- is thrown if the object is not found in the cache.oracle.ias.cache.RegionNotFoundException
- is thrown if the region is not found in the cache.NotARetrievableObjectException
- it thrown if the name refers to is a group or pool object.InvalidHandleException
- If the CacheAccess is no longer validCacheException
- if any other error occurs.load
, get
, get
, put
, put
, put
, put
, defineObject
public java.lang.Object get(java.lang.Object name, java.lang.Object args) throws oracle.ias.cache.ObjectNotFoundException, NotARetrievableObjectException, oracle.ias.cache.RegionNotFoundException, InvalidHandleException, CacheException
name
- An unique name of the object in the Cache within the region specified by the current CacheAccess The name Object must implement the equals and hashCode methods.args
- This arguments will be passed to the registered loader's load method. The usage is up to the implementation of the loader object.Object
A reference to the object associated with the nameoracle.ias.cache.ObjectNotFoundException
- is thrown if the object is not found in the cache.oracle.ias.cache.RegionNotFoundException
- is thrown if the region is not found in the cache.NotARetrievableObjectException
- it thrown if name refers to a group or pool object.InvalidHandleException
- If the CacheAccess is no longer validCacheException
- if any other error occurs.load
, get
, get
, put
, put
, put
, put
, defineObject
public java.lang.Object get(java.lang.Object name, java.lang.String group, java.lang.Object args) throws oracle.ias.cache.ObjectNotFoundException, NotARetrievableObjectException, oracle.ias.cache.RegionNotFoundException, InvalidHandleException, CacheException
name
- An unique name of the object in the Cache within the current region The name Object must implement the equals and hashCode methods.group
- If the object has not been loaded into the cache yet, this object will be associates with the specified group. A group can be created by calling defineGroup(String).args
- The arguments will be passed to the registered loader's load method. The usage is up to the implementation of the loader object.oracle.ias.cache.ObjectNotFoundException
- is thrown if the object is not found in the cache.oracle.ias.cache.RegionNotFoundException
- is thrown if the region is not found in the cache.NotARetrievableObjectException
- is thrown if name refers to a group or pool object in the cache.InvalidHandleException
- if the CacheAccess is no longer validCacheException
load
, get
, get
, put
, put
, put
, put
, defineObject
, defineGroup
public void loadList(java.lang.Object[] name) throws NotARetrievableObjectException, oracle.ias.cache.RegionNotFoundException, InvalidHandleException, CacheException
name
- An array of object names to be loaded in to the cacheoracle.ias.cache.RegionNotFoundException
- is thrown if the region is not found in the cache.NotARetrievableObjectException
- it thrown if the name refers to is a group or pool object.InvalidHandleException
- If the CacheAccess is no longer validCacheException
- if any other error occurs.loadList
, get
, get
, CacheListLoader
public void loadList(java.lang.Object[] name, java.lang.Object args) throws NotARetrievableObjectException, oracle.ias.cache.RegionNotFoundException, InvalidHandleException, CacheException
name
- An array of object names to be loaded in to the cacheargs
- The arguments will be passed to the registered loader's load method. The usage is up to the implementation of the loader object.oracle.ias.cache.RegionNotFoundException
- is thrown if the region is not found in the cache.NotARetrievableObjectException
- it thrown if the name refers to is a group or pool object.InvalidHandleException
- If the CacheAccess is no longer validCacheException
- if any other error occurs.loadList
, get
, get
, CacheListLoader
public void loadList(java.lang.Object[] name, java.lang.String group, java.lang.Object args) throws NotARetrievableObjectException, oracle.ias.cache.RegionNotFoundException, InvalidHandleException, CacheException
name
- An unique name of the object in the Cache within the region specified by the current CacheAccess. The name Object must implementgroup
- If the object has not been loaded into the cache yet, this object will be associates with the specified group. A group can be created by calling defineGroup(String).args
- The arguments will be passed to the registered loader's load method. The usage is up to the implementation of the loader object. the equals and hashCode methods.oracle.ias.cache.RegionNotFoundException
- is thrown if the region is not found in the cache.NotARetrievableObjectException
- it thrown if the name refers to is a group or pool object.InvalidHandleException
- If the CacheAccess is no longer validCacheException
- if any other error occurs.load
, get
, get
public void preLoad(java.lang.Object name) throws oracle.ias.cache.ObjectNotFoundException, InvalidHandleException, CacheException
name
- An unique name of the object in the Cache within the current region The name Object must implement the equals and hashCode methods.InvalidHandleException
- if the CacheAccess is no longer validoracle.ias.cache.ObjectNotFoundException
CacheException
load
, get
, put
, defineGroup
public void preLoad(java.lang.Object name, java.lang.Object args) throws oracle.ias.cache.ObjectNotFoundException, InvalidHandleException, CacheException
name
- An unique name of the object in the Cache within the current region The name Object must implement the equals and hashCode methods.args
- The arguments will be passed to the registered loader's load method. The usage is up to the implementation of the loader object.oracle.ias.cache.ObjectNotFoundException
- is thrown if the loader object is not foundInvalidHandleException
- if the CacheAccess is no longer validCacheException
load
, get
, put
, defineObject
, defineGroup
public void preLoad(java.lang.Object name, java.lang.String group, java.lang.Object args) throws oracle.ias.cache.ObjectNotFoundException, InvalidHandleException, CacheException
name
- An unique name of the object in the Cache within the current region The name Object must implement the equals and hashCode methods.group
- If the object has not been loaded into the cache yet, this object will be associates with the specified group. A group can be created by calling defineGroup(String).args
- The arguments will be passed to the registered loader's load method. The usage is up to the implementation of the loader object.oracle.ias.cache.ObjectNotFoundException
- is thrown if the loader object is not foundInvalidHandleException
- if the CacheAccess is no longer validCacheException
load
, get
, put
, defineObject
, defineGroup
public void put(java.lang.Object name, java.lang.Object obj) throws CacheException
name
- A name associated with the object to be put into the cache. This name has to be unique within a region. The name Object must implement the equals and hashCode methods.obj
- Object to be put into the cacheCacheException
- if any cache error occurs.put
, put
, put
, get
, load
public void put(java.lang.Object name, java.lang.String group, java.lang.Object obj) throws CacheException
name
- Name associated with the object to be put into the cache. The name Object must implement the equals and hashCode methods.group
- The Group where the object associated withobj
- Object to be put into the cacheCacheException
- if any cache error occurs.put
, put
, put
, get
, load
, defineGroup
public void put(java.lang.Object name, Attributes attr, java.lang.Object obj) throws CacheException
name
- Name associated with the object to be put into the cache The name Object must implement the equals and hashCode methods.attr
- Attributes associate with the objectobj
- Object to be put into the cacheCacheException
- if any cache error occurs.put
, put
, put
, Attributes
, get
, load
public void put(java.lang.Object name, java.lang.String group, java.lang.Object obj, Attributes attr) throws CacheException
name
- A globally unique name associated with the object to be put into the cachegroup
- The Group where the object associated withobj
- Object to be put into the cacheattr
- Attributes associate with the objectCacheException
- if any cache error occurs.put
, put
, put
, Attributes
, get
, load
, defineGroup
public java.lang.Object replace(java.lang.Object name, java.lang.Object obj) throws CacheException
name
- Name of the object to be replaced. The name Object must implement the equals and hashCode methods.obj
- to replace the current object in the cacheCacheException
- if any cache error occurs.replace
, get
, get
, get
public java.lang.Object replace(java.lang.Object name, java.lang.String group, java.lang.Object obj) throws CacheException, oracle.ias.cache.NullObjectException
name
- Name of the object to be replaced. The name Object must implement the equals and hashCode methods.group
- The Group where the object associated withobj
- to replace the current object in the cacheCacheException
- if any cache error occurs.oracle.ias.cache.NullObjectException
replace
, replace
, get
, get
, get
, defineGroup
public void replaceRemote(java.lang.Object name, java.lang.Object obj, oracle.ias.cache.CacheAddress addr) throws CacheException
name
- Name of the object to be replaced. The name Object must implement the equals and hashCode methods.obj
- to replace the current object in the cacheaddr
- the CacheAddress object associated with the remote cacheCacheException
- if any cache error occurs.replace
, replace
, get
, get
, get
public void replaceRemote(java.lang.Object name, java.lang.String group, java.lang.Object obj, oracle.ias.cache.CacheAddress addr) throws CacheException, oracle.ias.cache.NullObjectException
addr
- the CacheAddress object associated with the remote cachename
- Name of the object to be replaced. The name Object must implement the equals and hashCode methods.group
- The Group where the object associated withobj
- to replace the current object in the cacheCacheException
- if any cache error occurs.oracle.ias.cache.NullObjectException
replace
, replace
, replace
, get
, get
, get
public void invalidate() throws CacheException
CacheException
- if any cache error occurs.invalidate
, getAccess
, getAccess
, defineRegion
, destroy
, destroy
public void invalidate(boolean localOnly) throws CacheException
localOnly
- If true the region should only be invalidated in the local cache. The invalidation will not be distributed.CacheException
- if any cache error occurs.invalidate
, getAccess
, getAccess
, defineRegion
, destroy
, destroy
public void invalidate(java.lang.Object name) throws CacheException
name
- An object name or a group name.CacheException
- if any cache error occurs.invalidate
, destroy
, destroy
public void invalidate(java.lang.Object name, boolean localOnly) throws CacheException
name
- An object name or a group name.localOnly
- If true the object should only be invalidated in the local cache. The invalidation will not be distributed.CacheException
- if any cache error occurs.invalidate
, destroy
, destroy
public void invalidate(java.lang.Object[] names) throws CacheException
names
- An array of object and/or group names.CacheException
- if any cache error occurs.invalidate
, destroy
, destroy
public void invalidate(java.lang.Object[] names, boolean localOnly) throws CacheException
names
- An array of object and/or group names.localOnly
- If true the objects should only be invalidated in the local cache. The invalidation will not be distributed.CacheException
- if any cache error occurs.invalidate
, destroy
, destroy
public void disable() throws CacheException
CacheException
- if any cache error occurs.public void disable(java.lang.Object name) throws CacheException
name
- An object identifying a cache region, group or object.CacheException
- if any cache error occurs.public void enable() throws CacheException
CacheException
- if any cache error occurs.public void enable(java.lang.Object name) throws CacheException
name
- An object identifying a cache region, group or object.CacheException
- if any cache error occurs.public boolean isDisabled() throws CacheException
CacheException
- if any cache error occurs.public boolean isDisabled(java.lang.Object name) throws CacheException
CacheException
- if any cache error occurs.public void save() throws CacheException, oracle.ias.cache.NullObjectNameException
CacheException
- if any cache error occurs.oracle.ias.cache.NullObjectNameException
public void save(java.lang.Object objname) throws CacheException, oracle.ias.cache.NullObjectNameException
NullArgumentException
- if the object passed in is nullCacheException
- if any cache error occurs.oracle.ias.cache.NullObjectNameException
public void spool(java.lang.Object objname) throws CacheException, oracle.ias.cache.NullObjectNameException
NullArgumentException
- if the object passed in is nullCacheException
- if any cache error occurs.oracle.ias.cache.NullObjectNameException
public void close()
getAccess
, getAccess
public void defineGroup(java.lang.String name) throws CacheException
name
- Name of a group to be createdCacheException
- if any cache error occurs.defineGroup
, defineGroup
, defineGroup
public void defineGroup(java.lang.String name, java.lang.String group) throws CacheException
name
- Name of a group to be createdgroup
- Name of the group the new group will be associated withCacheException
- if any cache error occurs.defineGroup
, defineGroup
, defineGroup
public void defineGroup(java.lang.String name, Attributes attr) throws CacheException
name
- Name of a group to be createdattr
- Attributes of the group object.CacheException
- if any cache error occurs.defineGroup
, defineGroup
, defineGroup
public void defineGroup(java.lang.String name, java.lang.String group, Attributes attr) throws CacheException
name
- Name of a group to be created.group
- Name of a parent group where the new created group belongs to.attr
- Attributes of the group object.CacheException
- if any cache error occurs.defineGroup
, defineGroup
, defineGroup
public void defineSubRegion(java.lang.String name) throws CacheException
name
- Name of a subRegion to be created.CacheException
- if any cache error occurs.defineGroup
, defineGroup
, defineGroup
, defineSubRegion
public void defineSubRegion(java.lang.String name, Attributes attr) throws CacheException
name
- Name of a subRegion to be created.attr
- Attributes of the group object.CacheException
- if any cache error occurs.defineGroup
, defineGroup
, defineGroup
, defineSubRegion
public CacheAccess getSubRegion(java.lang.String name) throws CacheException
name
- Name of a subRegion to be created.CacheException
- if any cache error occurs.defineGroup
, defineGroup
, defineGroup
, defineSubRegion
, defineSubRegion
public CacheAccess getSubRegion(java.lang.String name, Attributes attr) throws CacheException
name
- Name of a subRegion to be created.attr
- Attributes to set for the regionCacheException
- if any cache error occurs.defineGroup
, defineGroup
, defineGroup
, defineSubRegion
, defineSubRegion
public java.lang.String getParent() throws CacheException
CacheException
- if any cache error occurs.defineSubRegion
, defineSubRegion
public void createPool(java.lang.String name, PoolInstanceFactory factory, Attributes attr, int min, int max) throws InvalidArgumentException, CacheException
name
- The name of the object pool.factory
- A user-defined PoolInstanceFactory.attr
- Attributes of the objects.min
- Minimum instances of the objects in the pool.max
- Maximum instances of the objects in the pool.InvalidArgumentException
- If min is below zero or max is below min or max is below 1CacheException
- if any cache error occurs.PoolAccess
, PoolInstanceFactory
, Attributes
public void createPool(java.lang.String name, java.lang.String group, PoolInstanceFactory factory, Attributes attr, int min, int max) throws InvalidArgumentException, CacheException
name
- The name of the object pool.group
- A group where the pool will be created in.factory
- A user-defined PoolInstanceFactory.attr
- Attributes of the objects.min
- Minimum instances of the objects in the pool.max
- Maximum instances of the objects in the pool.InvalidArgumentException
- If min is below zero or max is below min or max is below 1CacheException
- if any cache error occurs.PoolAccess
public void destroy() throws CacheException
CacheException
- if any cache error occurs.destroy
, destroy
, getAccess
, getAccess
public void destroy(boolean localOnly) throws CacheException
localOnly
- If true the region should only be invalidated in the local cache. The invalidation will not be distributed.CacheException
- if any cache error occurs.destroy
, destroy
, getAccess
, getAccess
public void destroy(java.lang.Object name) throws CacheException
name
- Name of the scope where all objects will be destroyedCacheException
- if any cache error occurs.destroy
public void destroy(java.lang.Object name, boolean localOnly) throws CacheException
name
- Name of the scope where all objects will be destroyedlocalOnly
- If true the object should only be invalidated in the local cache. The invalidation will not be distributed.CacheException
- if any cache error occurs.destroy
public void destroy(java.lang.Object[] names) throws CacheException
names
- Array of names of the scope where all objects will be destroyedCacheException
destroy
, destroy
public void destroy(java.lang.Object[] names, boolean localOnly) throws CacheException
names
- Array of names of the scope where all objects will be destroyedlocalOnly
- If true the objects should only be invalidated in the local cache. The invalidation will not be distributed.CacheException
- if any cache error occurs.destroy
, destroy
public void waitForResponse(int timeout) throws CacheException
timeout
- Timeout is the maximum number of milliseconds to wait for all remote caches to replyCacheException
- if any cache error occurs.cancelResponse
, Attributes
public void cancelResponse() throws CacheException
CacheException
- if any cache error occurs.waitForResponse
, Attributes
public java.lang.Object getOwnership(int timeout) throws CacheException
After an ownership is acquired, it is maintained until it is explicitly released by the user with the releaseOwnership method. The ownership of a region, group, or object is associated with a CacheAccess object instance. A CacheAccess object instance can have ownership of more than one object at a time.
timeout
- A period of time in milliseconds to be block if ownership of the specified object is not available.CacheException
- if any cache error occurs.ReleaseOwnership
, Attributes
public java.lang.Object getOwnership(java.lang.Object name, int timeout) throws CacheException
After an ownership is acquired, it is maintained until it is explicitly released by the user with the releaseOwnership method. The ownership of a region, group, or object is associated with a CacheAccess object instance. A CacheAccess object instance can have ownership of more than one object at a time.
name
- Name of an object for getting its ownershiptimeout
- A period of time in milliseconds to be block if ownership of the specified object is not available.CacheException
- if any cache error occurs.ReleaseOwnership
, Attributes
public java.lang.Object getOwnership(java.lang.Object name, java.lang.String group, int timeout) throws CacheException
After an ownership is acquired, it is maintained until it is explicitly released by the user with the releaseOwnership method. The ownership of a region, group, or object is associated with a CacheAccess object instance. A CacheAccess object instance can have ownership of more than one object at a time.
name
- Name of an object for getting its ownershipgroup
- Name of an group the object is associated withtimeout
- A period of time in milliseconds to be block if ownership of the specified object is not available.CacheException
- if any cache error occurs.ReleaseOwnership
, Attributes
public boolean isPresent(java.lang.Object name)
name
- Name of the object for getting its attributespublic void releaseOwnership(int timeout) throws CacheException
timeout
- Timeout is the maximum number of milliseconds to wait for allCacheException
- if any cache error occurs.getOwnership
, getOwnership
, Attributes
public void releaseOwnership(java.lang.Object name, int timeout) throws CacheException
name
- Name of an object for releasing its ownershiptimeout
- Timeout is the maximum number of milliseconds to wait for allCacheException
- if any cache error occurs.getOwnership
, getOwnership
, Attributes
public Attributes getAttributes() throws CacheException
CacheException
- if any cache error occurs.getAttributes
, Attributes
public Attributes getAttributes(java.lang.Object name) throws CacheException
name
- Name of the object for getting its attributesCacheException
- if any cache error occurs.getAttributes
, Attributes
public ObjectStatus getStatus() throws CacheException
CacheException
- if any cache error occurs.getStatus
, ObjectStatus
public AggregateStatus getAggregateStatus() throws CacheException
CacheException
- if any cache error occurs.getAggregateStatus
, AggregateStatus
public ObjectStatus getStatus(java.lang.Object name) throws CacheException
name
- Name of the object for getting its attributesCacheException
- if any cache error occurs.getStatus
, ObjectStatus
public AggregateStatus getAggregateStatus(java.lang.Object name) throws CacheException
name
- Name of the object for getting its attributesCacheException
- if any cache error occurs.getAggregateStatus
, AggregateStatus
public int getCount() throws CacheException
CacheException
public PoolAccess getPool(java.lang.String name) throws NotAPoolException, oracle.ias.cache.ObjectNotFoundException, CacheException
name
- Name of a pool object.NotAPoolException
- if name does not refer to a pool object.oracle.ias.cache.ObjectNotFoundException
- if name is not in the cache.CacheException
- if any other error occursPoolAccess
public java.lang.String getRegionName()
getAccess
, getDefRegionName
public java.lang.Object[] listNames() throws oracle.ias.cache.RegionNotFoundException, InvalidHandleException, CacheException
Object[]
An array of names of objects in the region nameoracle.ias.cache.RegionNotFoundException
- is thrown if the region is not found in the cache.InvalidHandleException
- If the CacheAccess is no longer validCacheException
- if any other error occurs.public java.lang.String[] listRegions() throws oracle.ias.cache.RegionNotFoundException, InvalidHandleException, CacheException
String[]
An array of the names of the subRegions in the regionoracle.ias.cache.RegionNotFoundException
- is thrown if the region is not found in the cache.InvalidHandleException
- If the CacheAccess is no longer validCacheException
- if any other error occurs.public java.util.Enumeration listObjects() throws oracle.ias.cache.RegionNotFoundException, InvalidHandleException, CacheException
Enumeration
An Enumeration of objects in the region nameoracle.ias.cache.RegionNotFoundException
- is thrown if the region is not found in the cache.InvalidHandleException
- If the CacheAccess is no longer validCacheException
- if any other error occurs.public java.util.Vector getAllCached(java.lang.Object name, int timeout) throws oracle.ias.cache.ObjectNotFoundException, NotARetrievableObjectException, oracle.ias.cache.RegionNotFoundException, InvalidHandleException, CacheException
name
- An unique name of the object in the Cache within the region specified by the current CacheAccess.timeout
- Timeout is the maximum number of milliseconds to wait for allVector
A vector to instances of the object associated with a nameoracle.ias.cache.ObjectNotFoundException
- is thrown if the object is not found in the cache.oracle.ias.cache.RegionNotFoundException
- is thrown if the region is not found in the cache.InvalidHandleException
- If the CacheAccess is no longer validCacheException
- if any other error occurs.NotARetrievableObjectException
load
, get
, get
, put
, put
, put
, put
, defineObject
, cancelResponse
public java.util.Vector getAllCached(java.lang.Object name, int timeout, boolean ignoreRemoteEx) throws oracle.ias.cache.ObjectNotFoundException, NotARetrievableObjectException, oracle.ias.cache.RegionNotFoundException, InvalidHandleException, CacheException
name
- An unique name of the object in the Cache within the region specified by the current CacheAccess.timeout
- Timeout is the maximum number of milliseconds to wait for allignoreRemoteEx
- A boolean variable to indicate whether the user cares about possible exceptions returned by remote cachesVector
A vector to instances of the object associated with a nameoracle.ias.cache.ObjectNotFoundException
- is thrown if the object is not found in the cache.oracle.ias.cache.RegionNotFoundException
- is thrown if the region is not found in the cache.InvalidHandleException
- If the CacheAccess is no longer validCacheException
- if any other error occurs.NotARetrievableObjectException
load
, get
, get
, put
, put
, put
, put
, defineObject
, cancelResponse
public java.lang.String toString()
public static java.lang.String getDefRegionName()
getRegionName
|
Oracle Application Server Java Object Cache API Reference 10g Release 2 (10.1.2) B14018-02 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |