com.bea.cache.jcache
Interface CacheLoader


public interface CacheLoader


Method Summary
 java.lang.Object load(java.lang.Object key)
          Loads an object.
 java.util.Map loadAll()
          Loads the entire cache.
 java.util.Map loadAll(java.util.Collection keys)
          Loads multiple object.
 

Method Detail

load

public java.lang.Object load(java.lang.Object key)
Loads an object. Application writers 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:
key - the key identifying the object being loaded
Returns:
The object that is to be stored in the cache. A null value may be returned.
Throws:
CacheException - Indicates that the key could not be loaded

loadAll

public java.util.Map loadAll(java.util.Collection keys)
Loads multiple object. Application writers should implement this method to customize the loading of a collection of keys. This method is called by the caching service when more than one keys need to be loaded

Parameters:
keys - a Collection of keys identifying the objects to be loaded
Returns:
A Map of objects that are to be stored in the cache. If no keys could be loaded, an empty map must be returned.
Throws:
CacheException - Indicates that the key could not be loaded

loadAll

public java.util.Map loadAll()
Loads the entire cache. Application writers may implement this method to customize the loading or pre-loading of the entire cache

Returns:
The map of objects to be stored in the cache. If no keys could be loaded, an empty map must be returned.
Throws:
CacheException - Indicates that the key could not be loaded


Copyright © 2007 BEA Systems All Rights Reserved.