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 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
-
put
public void put(String key, Object item)
Description copied from interface:ICacheadd item to cache
-
removeItem
public boolean removeItem(String key)
Description copied from interface:ICacheremove item and return true if removed.- Specified by:
removeItemin interfaceICache- Returns:
-
removeAll
public void removeAll()
Description copied from interface:ICacheremove all items from cache.
-
getSize
public int getSize()
Description copied from interface:ICachereturn the number of items contains in Cache.
-
getKeys
public Collection<String> getKeys()
Description copied from interface:ICachereturn all keys contains in cache.
-
-