org.apache.jcs.engine.behavior
Interface ICache

All Superinterfaces:
ICacheType, java.io.Serializable
All Known Subinterfaces:
AuxiliaryCache
All Known Implementing Classes:
AbstractDiskCache, CompositeCache, JavaGroupsCache, LateralCache, LateralCacheNoWait, LateralCacheNoWaitFacade, RemoteCache, RemoteCacheNoWait, RemoteCacheNoWaitFacade

public interface ICache
extends ICacheType

This is the top level interface for all cache like structures. It defines the methods used internally by JCS to access, modify, and instrument such structures. This allows for a suite of reusable components for accessing such structures, for example asynchronous access via an event queue.

Version:
$Id: ICache.java,v 1.7 2005/06/04 02:01:56 asmuts Exp $

Field Summary
 
Fields inherited from interface org.apache.jcs.engine.behavior.ICacheType
CACHE_HUB, DISK_CACHE, LATERAL_CACHE, REMOTE_CACHE
 
Method Summary
 void dispose()
          Prepares for shutdown.
 ICacheElement get(java.io.Serializable key)
          Gets an item from the cache.
 java.lang.String getCacheName()
          Returns the cache name.
 int getSize()
          Returns the current cache size.
 java.lang.String getStats()
          Returns the cache stats.
 int getStatus()
          Returns the cache status.
 boolean remove(java.io.Serializable key)
          Removes an item from the cache.
 void removeAll()
          Removes all cached items from the cache.
 void update(ICacheElement ce)
          Puts an item to the cache.
 
Methods inherited from interface org.apache.jcs.engine.behavior.ICacheType
getCacheType
 

Method Detail

update

public void update(ICacheElement ce)
            throws java.io.IOException
Puts an item to the cache.

Throws:
java.io.IOException

get

public ICacheElement get(java.io.Serializable key)
                  throws java.io.IOException
Gets an item from the cache.

Throws:
java.io.IOException

remove

public boolean remove(java.io.Serializable key)
               throws java.io.IOException
Removes an item from the cache.

Throws:
java.io.IOException

removeAll

public void removeAll()
               throws java.io.IOException
Removes all cached items from the cache.

Throws:
java.io.IOException

dispose

public void dispose()
             throws java.io.IOException
Prepares for shutdown.

Throws:
java.io.IOException

getSize

public int getSize()
Returns the current cache size.


getStatus

public int getStatus()
Returns the cache status.


getStats

public java.lang.String getStats()
Returns the cache stats.


getCacheName

public java.lang.String getCacheName()
Returns the cache name.



Copyright © 2002-2005 Apache Software Foundation. All Rights Reserved.