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

B10388-01

oracle.ias.cache
Class CacheLoader

java.lang.Object
  |
  +--oracle.ias.cache.CacheLoader
Direct Known Subclasses:
CacheListLoader

public abstract class CacheLoader
extends java.lang.Object

CacheLoader is an abstract class. Application should extend this class to handle the loading of objects into the cache. A cache loader can be registered for a region, a group or a specific object using CacheAccess object's define methods.

Since:
2.0.0
Version:
2.0.0 07/12/00
See Also:
CacheAccess.defineRegion, CacheAccess.defineGroup, CacheAccess.defineObject

Constructor Summary
CacheLoader()
           

 

Method Summary
abstract  java.lang.Object load(java.lang.Object handle, java.lang.Object argument)
          is an abstract method.

 

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

 

Constructor Detail

CacheLoader

public CacheLoader()
Method Detail

load

public abstract java.lang.Object load(java.lang.Object handle,
                                      java.lang.Object argument)
                               throws CacheException
is an abstract method. Applications should implement this method to customize the loading of cache object. This method is called by the caching service when the requested object is not in the cache.
Parameters:
handle - An internal handle object is passed in from cache service. It should only be used as the first parameter of the netSearch(handle, timeout) or setAttributes(handle, attributes) API.
argument - 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)
Returns:
In general, the object that is to be saved in the cache should be returned. If createStream has been called the OutputStream object returned by createStream should be returned. If createDiskObject is called the File object returned by createDiskObject should be returned.
Throws:
CacheException - if any error occurs.
Since:
2.0.0
See Also:
CacheAccess.get

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

B10388-01

Copyright © 2003 Oracle Corporation. All Rights Reserved.