net.sf.swarmcache
Interface ObjectCache

All Known Implementing Classes:
AutoCache, HybridCache, LRUCache, MultiCache, TimerCache

public interface ObjectCache

Generic caching mechanism.

Author:
John Watkinson

Method Summary
 java.lang.Object clear(java.io.Serializable key)
          Clears an object from the cache by key.
 void clearAll()
          Clears the entire cache.
 java.lang.Object get(java.io.Serializable key)
          Gets an object from the cache by key, or returns null if that object is not cached.
 java.util.Set getAllKeys()
          Get all items.
 java.lang.String getType()
          Gets the common name of the type of objects to cache.
 void put(java.io.Serializable key, java.lang.Object object)
          Adds an object to the cache.
 void setType(java.lang.String type)
          Sets the common name of the type of objects to cache.
 

Method Detail

getType

java.lang.String getType()
Gets the common name of the type of objects to cache.


setType

void setType(java.lang.String type)
Sets the common name of the type of objects to cache.


put

void put(java.io.Serializable key,
         java.lang.Object object)
Adds an object to the cache.


get

java.lang.Object get(java.io.Serializable key)
Gets an object from the cache by key, or returns null if that object is not cached.


clear

java.lang.Object clear(java.io.Serializable key)
Clears an object from the cache by key.


clearAll

void clearAll()
Clears the entire cache.


getAllKeys

java.util.Set getAllKeys()
Get all items.



Copyright © 2002-2008 TrackStudio, Ltd. All Rights Reserved.