|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
K - Type of the keys in the cache.T - Type of the values bound to the keys in the cache.public interface CacheItemUser<K,T>
An interface presented to the user of the cache item. Its main function is to retrieve values from the cache, but also to get configuration information and information about the current state of keys (their last updates, etc) handeled by this cache item.
| Method Summary | |
|---|---|
T |
get(K key)
Gets an object that is bound to the given key in the associated TreeCache node. |
Fqn |
getFqn()
|
int |
getId()
|
java.lang.String |
getInfo()
|
long |
getInterval()
|
java.util.Set<K> |
getKeysDuringUpdate()
|
java.util.Map<K,java.lang.Throwable> |
getKeysExceptions()
|
java.util.Map<K,java.lang.Long> |
getKeysUpdates()
|
java.lang.String |
getMbeanName()
|
java.lang.String |
getName()
|
void |
register()
Registers this cache item in the service. |
void |
resetKey(java.lang.Object key)
Resets the given key, that is, it's update status. |
void |
setInterval(long interval)
|
void |
unregister()
Removes all keys handled by this cache item from the associated TreeCache node and stops updates on this cache item. |
| Method Detail |
|---|
void resetKey(java.lang.Object key)
key - Key, which update status should be reset.T get(K key)
CacheItemDataSource.init(Object) method of a data source
that was passed to CacheItem.create(CacheItemDataSource)).
key - Key of the object to get.
void register()
CacheItem.create(CacheItemDataSource)),
so you will only need to use it if you previously
manually unregistered the cache item using unregister().
void unregister()
Fqn getFqn()
long getInterval()
CacheItemDataSource.update(Object, Object) method will
be executed on every service thread update (for every key).void setInterval(long interval)
interval - Interval at which the update operation will be executed.
Effectively, the interval will be rounded to the nearest multiplicity of
the service update thread interval. The interval should be given in milliseconds.
If it is 0, the CacheItemDataSource.update(Object, Object) method will
be executed on every service thread update (for every key).java.lang.String getMbeanName()
RenewableCacheServiceMBean interface, associated
with this cache item.int getId()
java.lang.String getInfo()
CacheItemDataSource.getInfo().java.lang.String getName()
CacheItem --- the fully qualified name of the class
implementing CacheItemDataSource.java.util.Map<K,java.lang.Long> getKeysUpdates()
java.util.Set<K> getKeysDuringUpdate()
java.util.Map<K,java.lang.Throwable> getKeysExceptions()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||