|
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.CacheAction
|
+--com.vignette.portal.cache.PassivatingCacheAction
Removes objects from memory without removing them from the Store based on keys.
It interacts with a PassivationStorageHandler to transfer values from the store
to a non-memory storage location. This is done in order to reduce memory footprint.
| Constructor Summary | |
PassivatingCacheAction(PassivationStorageHandler handler)
Creates an action that uses handler for storage. |
|
| Method Summary | |
void |
onAction(Object key)
This method is called when the CacheStrategy determines
that action is needed for key. |
void |
onActions(Collection keys)
This method is called when the CacheStrategy determines
that action is needed for keys. |
void |
onAdd(Object key,
Object value,
Map properties)
Signals addition to the strategy. |
void |
onAddAll(Map keyValuePairs,
Map properties)
Signals addition to the strategy. |
void |
onGet(Object key,
Map properties)
Someone is accessing key in the CacheStrategy. |
void |
onGetAll(Collection keys,
Map properties)
Someone is accessing all the items mentioned in keys
in the CacheStrategy. |
void |
onRemove(Object key)
Signals removal from the strategy. |
void |
onRemoveAll()
Signals clearing of the strategy. |
void |
onRemoveAll(Collection keys)
Signals removal from the strategy. |
| Methods inherited from class com.vignette.portal.cache.CacheAction |
getStore, setStore |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public PassivatingCacheAction(PassivationStorageHandler handler)
Creates an action that uses handler for storage.
handler - the handler to use to passivate values| Method Detail |
public void onGet(Object key,
Map properties)
throws CacheException
CacheActionSomeone is accessing key in the CacheStrategy. This
will not be invoked for keys that the strategy is not monitoring.
Individual actions can use the information in
properties to override their creation-time parameters.
This implementation is a no-op.
onGet in class CacheActioncom.vignette.portal.cache.CacheActionkey - item being looked upproperties - possible overrides, can be null
public void onGetAll(Collection keys,
Map properties)
throws CacheException
CacheActionSomeone is accessing all the items mentioned in keys
in the CacheStrategy. This will not be invoked for keys that
the strategy is not monitoring.
Individual actions can use the information in
properties to override their creation-time parameters.
This implementation is a no-op.
onGetAll in class CacheActioncom.vignette.portal.cache.CacheActionkeys - items being looked upproperties - possible overrides, can be null
public void onAdd(Object key,
Object value,
Map properties)
CacheActionSignals addition to the strategy. This event implies that its strategy
is monitoring key so the action should also monitor the key
if that is necessary for the action's function.
Individual actions can use the information in
properties to override their creation-time parameters.
This method should not throw any exception since it mirrors the function
of the CacheStrategy.onAdd(java.lang.Object, java.lang.Object, java.util.Map)
method.
This implementation is a no-op.
onAdd in class CacheActioncom.vignette.portal.cache.CacheActionkey - key being inserted in the cachevalue - value being inserted in the cache, matching keyproperties - possible overrides, can be null
public void onAddAll(Map keyValuePairs,
Map properties)
CacheActionSignals addition to the strategy. This event implies that its strategy
is monitoring the mapping in keyValuePairs so the action should
also monitor the pairs if that is necessary for the action's function.
Individual actions can use the information in
properties to override their creation-time parameters.
This method should not throw any exception since it mirrors the function
of the CacheStrategy.onAddAll(java.util.Map, java.util.Map) method.
This implementation is a no-op.
onAddAll in class CacheActioncom.vignette.portal.cache.CacheActionkeyValuePairs - key/value pairs being added to the cacheproperties - possible overrides, can be nullpublic void onRemove(Object key)
CacheActionSignals removal from the strategy. This event implies that its strategy
has stopped monitoring key, so the action should also stop monitoring
key and clean up if necessary.
This method should not throw any exception since it mirrors the function
of the CacheStrategy.onRemove(java.lang.Object) method.
This implementation is a no-op.
onRemove in class CacheActioncom.vignette.portal.cache.CacheActionkey - key being removed from the strategypublic void onRemoveAll(Collection keys)
CacheActionSignals removal from the strategy. This event implies that its strategy
has stopped monitoring all of keys, so the action should also
stop monitoring keys and clean up if necessary.
This method should not throw any exception since it mirrors the function
of the CacheStrategy.onRemoveAll(java.util.Collection) method.
This implementation is a no-op.
onRemoveAll in class CacheActioncom.vignette.portal.cache.CacheActionkeys - keys being removed from the strategypublic void onRemoveAll()
CacheActionSignals clearing of the strategy. This event implies that its strategy has stopped monitoring all keys, so the action should also stop monitoring all of the keys and clean up if necessary.
This method should not throw any exception since it mirrors the function
of the CacheStrategy.onRemoveAll() method.
This implementation is a no-op.
onRemoveAll in class CacheActionpublic void onAction(Object key)
CacheActionThis method is called when the CacheStrategy determines
that action is needed for key.
Typical examples of this are when the key "expires"
or when the cache is full and needs to remove a value that has not
been used for a while.
onAction in class CacheActioncom.vignette.portal.cache.CacheActionkey - the key for which action is neededpublic void onActions(Collection keys)
CacheActionThis method is called when the CacheStrategy determines
that action is needed for keys.
Typical examples of this are when the keys "expire"
or when the cache is full and needs to remove values that have not
been used for a while.
onActions in class CacheActioncom.vignette.portal.cache.CacheActionkeys - the collection of keys for which action is needed
|
02/28/2005 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||