Package org.javlo.cache
Interface ICache
-
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
MapCache
public interface ICache extends Serializable
Interface use for Cache- Author:
- Patrick Vandermaesen
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Objectget(String key)get a item from cache.Collection<String>getKeys()return all keys contains in cache.StringgetName()get the name of the cache.intgetSize()return the number of items contains in Cache.voidput(String key, Object item)add item to cachevoidremoveAll()remove all items from cache.booleanremoveItem(String key)remove item and return true if removed.
-
-
-
Method Detail
-
getName
String getName()
get the name of the cache.- Returns:
-
removeItem
boolean removeItem(String key)
remove item and return true if removed.- Parameters:
key-- Returns:
-
removeAll
void removeAll()
remove all items from cache.
-
getSize
int getSize()
return the number of items contains in Cache.- Returns:
-
getKeys
Collection<String> getKeys()
return all keys contains in cache.- Returns:
-
-