|
||||||||||
| 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<Object,Object> |
map
|
| Constructor Summary | |
|---|---|
MapCache()
|
|
MapCache(Map<Object,Object> 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<Object,Object> map
| Constructor Detail |
|---|
public MapCache()
public MapCache(Map<Object,Object> map)
| Method Detail |
|---|
public Object put(Object key,
Object value)
Cache
put in interface Cachepublic Object get(Object key)
Cacheput into this object.
get in interface Cachepublic Object remove(Object key)
Cache
remove in interface Cachepublic void close()
Cache
close in interface Cachepublic int size()
Cache
size in interface Cache
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||