org.jboss.shotoku.cache
Interface CacheItemOperations<K,T>

Type Parameters:
K - Type of the keys in the cache.
T - Type of the values bound to the keys in the cache.
All Superinterfaces:
CacheItemUser<K,T>
All Known Implementing Classes:
CacheItem

public interface CacheItemOperations<K,T>
extends CacheItemUser<K,T>

Operations on a cache item that shouldn't be visible to the user --- mainly the update() method.

Author:
Adam Warski

Method Summary
 void reportUpdateOk(K key)
          Reports that an update of a key ended wihtout any exceptions.
 void reportUpdateWithException(K key, java.lang.Throwable t)
          Reports that an update of a key ended with an exception.
 void update()
          Called by the service update thread to update all keys and associated values.
 
Methods inherited from interface org.jboss.shotoku.cache.CacheItemUser
get, getFqn, getId, getInfo, getInterval, getKeysDuringUpdate, getKeysExceptions, getKeysUpdates, getMbeanName, getName, register, resetKey, setInterval, unregister
 

Method Detail

update

void update()
Called by the service update thread to update all keys and associated values. You shouldn't call it from inside your code.


reportUpdateOk

void reportUpdateOk(K key)
Reports that an update of a key ended wihtout any exceptions.

Parameters:
key - Key which has been updated.

reportUpdateWithException

void reportUpdateWithException(K key,
                               java.lang.Throwable t)
Reports that an update of a key ended with an exception.

Parameters:
key - Key which has been updated.
t - Exception which was thrown during the update.