Package org.javlo.cache
Class MapCache
- java.lang.Object
-
- org.javlo.cache.MapCache
-
- All Implemented Interfaces:
Serializable
,ICache
public class MapCache extends Object implements ICache
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete 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
-
put
public void put(String key, Object item)
Description copied from interface:ICache
add item to cache
-
removeItem
public boolean removeItem(String key)
Description copied from interface:ICache
remove item and return true if removed.- Specified by:
removeItem
in interfaceICache
- Returns:
-
removeAll
public void removeAll()
Description copied from interface:ICache
remove all items from cache.
-
getSize
public int getSize()
Description copied from interface:ICache
return the number of items contains in Cache.
-
getKeys
public Collection<String> getKeys()
Description copied from interface:ICache
return all keys contains in cache.
-
-