|
02/28/2005 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.vignette.portal.cache.PassivationStorageHandler
Handles external storage to support passivation. This is a base class provides
the interface for PassivatingCacheAction.
| Constructor Summary | |
PassivationStorageHandler()
|
|
| Method Summary | |
abstract void |
clear(Object key,
Object storeLookupKey)
Clears the value from the external storage location that was previously stored, using key and storeLookupKey. |
abstract Object |
reload(Object key,
Object storeLookupKey)
Reloads the value previously stored, using the key and
storeLookupKey. |
abstract Object |
store(Object key,
Object value)
Stores value and maps key to an external storage
key. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public PassivationStorageHandler()
| Method Detail |
public abstract Object store(Object key,
Object value)
throws CacheException
Stores value and maps key to an external storage
key.
The key provided may not be an appropriate way of locating the data in
the external storage location. The handler can choose to use a more approriate
storage key which it returns to the caller. The handler will receive this storage
key in later calls to its PassivationStorageHandler.reload(java.lang.Object, java.lang.Object) and PassivationStorageHandler.clear(java.lang.Object, java.lang.Object) methods. This method
must always return a non-null value, which could simply be key.
key - the key that the cache uses to refer to the valuevalue - the value that the cache wants passivated
public abstract Object reload(Object key,
Object storeLookupKey)
throws CacheException
Reloads the value previously stored, using the key and
storeLookupKey.
The reload operation should also clear the data from its external storage location as the value will be managed in memory from this point on (or until it is passivated again). If an exception is thrown, do not remove the value from external storage so the cache can try again.
key - the key that the cache uses to refer to the valuestoreLookupKey - the key returned by the PassivationStorageHandler.store(java.lang.Object, java.lang.Object) method
public abstract void clear(Object key,
Object storeLookupKey)
Clears the value from the external storage location that was previously stored,
using key and storeLookupKey.
This is used when the value related to the key is no longer being managed, but
does not need to be returned. An example of this is during the
CacheAction.onRemove(java.lang.Object) event. The reason for using this method, rather than
calling PassivationStorageHandler.reload(java.lang.Object, java.lang.Object) and discarding the value, is that retrieving the value
might be less efficient than simply reclaiming its storage space.
Note that the method cannot throw an exception. The caller no longer cares about this value. Whether its storage was properly reclaimed or not is an internal matter for the implementation.
key - the key that the cache uses to refer to the valuestoreLookupKey - the key returned by the PassivationStorageHandler.store(java.lang.Object, java.lang.Object) method
|
02/28/2005 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||