|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.activemq.memory.MapCache
public class MapCache
Use any Map to implement the Cache. No cache eviction going on here. Just gives a Map a Cache interface.
Field Summary | |
---|---|
protected Map |
map
|
Constructor Summary | |
---|---|
MapCache()
|
|
MapCache(Map map)
|
Method Summary | |
---|---|
void |
close()
Lets a cache know it will not be used any further and that it can release acquired resources |
Object |
get(Object key)
Gets an object that was previously put into this object. |
Object |
put(Object key,
Object value)
Puts an object into the cache. |
Object |
remove(Object key)
Removes an object from the cache. |
int |
size()
How big is the cache right now? |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final Map map
Constructor Detail |
---|
public MapCache()
public MapCache(Map map)
Method Detail |
---|
public Object put(Object key, Object value)
Cache
put
in interface Cache
public Object get(Object key)
Cache
put
into this object.
get
in interface Cache
public Object remove(Object key)
Cache
remove
in interface Cache
public void close()
Cache
close
in interface Cache
public int size()
Cache
size
in interface Cache
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |