Save This Page
Home » oscache-2.4.1-full » com.opensymphony.oscache » web » [javadoc | source]
com.opensymphony.oscache.web
public final class: ServletCache [javadoc | source]
java.lang.Object
   com.opensymphony.oscache.base.Cache
      com.opensymphony.oscache.web.ServletCache

All Implemented Interfaces:
    HttpSessionBindingListener, Serializable

A simple extension of Cache that implements a session binding listener, and deletes it's entries when unbound
Fields inherited from com.opensymphony.oscache.base.Cache:
NESTED_EVENT,  listenerList
Constructor:
 public ServletCache(ServletCacheAdministrator admin,
    int scope) 
    Create a new ServletCache
    Parameters:
    admin - The ServletCacheAdministrator to administer this ServletCache.
    scope - The scope of all entries in this hashmap
 public ServletCache(ServletCacheAdministrator admin,
    String algorithmClass,
    int limit,
    int scope) 
    Create a new Cache
    Parameters:
    admin - The CacheAdministrator to administer this Cache.
    algorithmClass - The class that implement an algorithm
    limit - The maximum cache size in number of entries
    scope - The cache scope
Method from com.opensymphony.oscache.web.ServletCache Summary:
getScope,   isStale,   valueBound,   valueUnbound
Methods from com.opensymphony.oscache.base.Cache:
addCacheEventListener,   addCacheEventListener,   cancelUpdate,   clear,   completeUpdate,   flushAll,   flushAll,   flushEntry,   flushEntry,   flushGroup,   flushGroup,   flushPattern,   flushPattern,   getCacheEntry,   getCacheEventListenerList,   getCapacity,   getFromCache,   getFromCache,   getFromCache,   getNbEntries,   getNbUpdateState,   getPersistenceListener,   getSize,   getUpdateState,   isFlushed,   isStale,   putInCache,   putInCache,   putInCache,   putInCache,   releaseUpdateState,   removeCacheEventListener,   removeCacheEventListener,   removeEntry,   removeEntry,   setCapacity,   setPersistenceListener
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from com.opensymphony.oscache.web.ServletCache Detail:
 public int getScope() 
    Get the cache scope
 protected boolean isStale(CacheEntry cacheEntry,
    int refreshPeriod,
    String cronExpiry) 
    Indicates whether or not the cache entry is stale. This overrides the Cache#isStale(CacheEntry, int, String) method to take into account any flushing that may have been applied to the scope that this cache belongs to.
 public  void valueBound(HttpSessionBindingEvent event) 
    When this Cache is bound to the session, do nothing.
 public  void valueUnbound(HttpSessionBindingEvent event) 
    When the users's session ends, all listeners are finalized and the session cache directory is deleted from disk.