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 Object
get(String key)
get a item from cache.Collection<String>
getKeys()
return all keys contains in cache.String
getName()
get the name of the cache.int
getSize()
return the number of items contains in Cache.void
put(String key, Object item)
add item to cachevoid
removeAll()
remove all items from cache.boolean
removeItem(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:
-
-