SK.gnome.dwarf.utils.cache
Class Cacheable.CacheEvent

java.lang.Object
  extended bySK.gnome.dwarf.utils.cache.Cacheable.CacheEvent
Enclosing class:
Cacheable

public static class Cacheable.CacheEvent
extends java.lang.Object

The cache event.


Field Summary
static Cacheable.CacheEvent ADDED
          The object has been added to the cache.
static Cacheable.CacheEvent INVALIDATED
          The object has been invalidated.
static Cacheable.CacheEvent REMOVED
          The object has been removed from the cache.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ADDED

public static final Cacheable.CacheEvent ADDED
The object has been added to the cache.

The cached object may adjust its internal state according to this event. For example, a cached TCP/IP connection may start to polling the remote site in a specified period of time to keep the connection alive while it is waiting in the cache.


REMOVED

public static final Cacheable.CacheEvent REMOVED
The object has been removed from the cache.

The cached object may adjust its internal state according to this event. For example, a cached TCP/IP connection may stop polling the remote site to keep the connection alive while it has been waiting in the cache. The removed object is still valid and may be added to the cache again for the reusing.


INVALIDATED

public static final Cacheable.CacheEvent INVALIDATED
The object has been invalidated.

Invalidation may occur when a cached entry is removed due to its expiration, it is replaced by another cache entry, or when the whole cache content is cleared explicitly. The object should perform any necessary steps to clear its internal state and free the used resources. For example, a cached database connection may release any records and buffers it had been using and close the connection to the SQL backend.



Copyright (c) 1999-2005, Gnome Ltd. All rights reserved.