org.shiftone.cache
Interface Cache

All Known Subinterfaces:
ReapableCache
All Known Implementing Classes:
AbstractPolicyCache, ClusterCache, EHCacheCache, FifoCache, FjankkCache, JcsCache, JmxCache, LfuCache, LruCache, MapCache, MissHandlingCache, OroCache, OSCache, RingFifoCache, SingleCache, SoftCache, StatCache, SwarmCache, SyncCache, TandemCache, WhirlyCache, ZeroCache

public interface Cache

Interface Cache

Version:
$Revision: 1.10 $
Author:
Jeff Drost

Method Summary
 void addObject(java.lang.Object key, java.lang.Object cacheObject)
          adds an object to the cache
 void clear()
          Removes ALL keys and values from the cache.
 java.lang.Object getObject(java.lang.Object key)
          gets the value stored in the cache by it's key, or null if the key is not found.
 void remove(java.lang.Object key)
          remove a specific key/value pair from the cache
 int size()
          The number of key/value pares in the cache
 

Method Detail

addObject

public void addObject(java.lang.Object key,
                      java.lang.Object cacheObject)
adds an object to the cache


getObject

public java.lang.Object getObject(java.lang.Object key)
gets the value stored in the cache by it's key, or null if the key is not found.


size

public int size()
The number of key/value pares in the cache


remove

public void remove(java.lang.Object key)
remove a specific key/value pair from the cache


clear

public void clear()
Removes ALL keys and values from the cache. Use with digression. Using this method too frequently may defeat the purpose of caching.