|
Oracle Application Server 10g Java Object Cache API Reference 10g Release 2 (10.1.2) B14018-01 November 2004 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectoracle.ias.cache.CacheLoader
oracle.ias.cache.CacheListLoader
CacheListLoader is an abstract class. The application writer should extend this class to handle the loading of objects into the cache. A cache list loader can be registered for a region or group. The cache list loader differs from the CacheLoader in that the list loader will allow multiple objects to be loaded with a single call to the loader.
CacheAccess.defineRegion,
CacheAccess.defineGroup,
CacheAccess.defineObject,
CacheLoader| Constructor Summary | |
CacheListLoader()
|
|
| Method Summary | |
protected java.lang.Object[] |
getList(java.lang.Object handle)
returns original list of objects submitted by the user |
protected java.lang.Object |
getNamedObject(java.lang.Object handle,
java.lang.Object name)
Returns the name of the object to be loaded This method allows the implementor of the loadList method to iterate through the list of Objects based on the name of the object rather than the order the objects are in the list. |
protected java.lang.Object |
getNextObject(java.lang.Object handle)
returns the name of the next object in the list to be loaded This method allows the implementor of the loadList method to iterate through the list of Objects that need to be loaded |
abstract void |
loadList(java.lang.Object handle,
java.lang.Object argument)
This is an abstract method, applications should implement this method to customize the loading of a list of cache objects. |
protected void |
saveObject(java.lang.Object handle,
java.lang.Object obj)
saves the given object to the cache, associating it with the current object name as set by getNextObject or getNamedObject. |
protected boolean |
saveObject(java.lang.Object handle,
java.lang.Object name,
java.lang.Object obj)
saves the given object to the cache, associating it with the named object. |
| Methods inherited from class oracle.ias.cache.CacheLoader |
createDiskObject, createDiskObject, createStream, createStream, exceptionHandler, getFromRemote, getName, getRegion, isRemoteRequest, load, log, netSearch, netSearch, setAttributes |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public CacheListLoader()
| Method Detail |
public abstract void loadList(java.lang.Object handle,
java.lang.Object argument)
throws CacheException
This method is called by the caching service when any of the requested objects are not in the cache. The getNextMethod must be used to iterate through the list to retrieve each object to be loaded. Only the objects not already in the cache will be loaded. The saveObject method must be used to save the object to the cache once it is created. SaveObject will associate the object with the current name.
handle - An internal handle object is passed in from cache service.
It should only be used as the first parameter of the helper methods in
this classargument - It is an argument object for load method passed in from
customer code. This object is passed in as args either in
get(String name, Object args), or get(String name, String group,
Object args)
CacheException - if any error occurs.CacheAccess.loadList(Object[]),
CacheAccess.loadList(Object[], Object),
CacheAccess.loadList(Object[], String, Object)
protected final java.lang.Object getNextObject(java.lang.Object handle)
throws CacheException
This method allows the implementor of the loadList method to iterate through the list of Objects that need to be loaded
handle - An internal cache handle object, it is passed in
as the first parameter in load(Object handle, Object argument().
CacheException
protected final java.lang.Object[] getList(java.lang.Object handle)
throws CacheException
handle - An internal cache handle object, it is passed in
as the first parameter in load(Object handle, Object argument().
CacheException
protected final java.lang.Object getNamedObject(java.lang.Object handle,
java.lang.Object name)
throws CacheException
This method allows the implementor of the loadList method to iterate through the list of Objects based on the name of the object rather than the order the objects are in the list. If the named object is in the list and needs to be loaded, context is set so the next saveObject call will associate the loaded object with the name. If the object is not in the list or does not need to be loaded a null is returned. If saveObject is called an InvalidOperationException will be thrown.
handle - An internal cache handle object, it is passed in
as the first parameter in loadList(Object handle, Object argument().name - The name of the object to be loaded
CacheException
protected final void saveObject(java.lang.Object handle,
java.lang.Object obj)
throws CacheException
handle - An internal cache handle object, it is passed in
as the first parameter in loadList(Object handle, Object argument().obj - the object to be saved to the cache
CacheException
protected final boolean saveObject(java.lang.Object handle,
java.lang.Object name,
java.lang.Object obj)
throws CacheException
handle - An internal cache handle object, it is passed in
as the first parameter in loadList(Object handle, Object argument().name - The name of the object to be loadedobj - the object to be saved to the cache
CacheException
|
Oracle Application Server 10g Java Object Cache API Reference 10g Release 2 (10.1.2) B14018-01 November 2004 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||