org.apache.activemq.memory
Interface Cache

All Known Implementing Classes:
CacheFilter, MapCache, UsageManagerCacheFilter

public interface Cache

Defines the interface used to cache messages.


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?
 

Method Detail

get

Object get(Object key)
Gets an object that was previously put into this object.

Parameters:
msgid -
Returns:
null if the object was not previously put or if the object has expired out of the cache.

put

Object put(Object key,
           Object value)
Puts an object into the cache.

Parameters:
messageID -
message -

remove

Object remove(Object key)
Removes an object from the cache.

Parameters:
messageID -
Returns:
the object associated with the key if it was still in the cache.

close

void close()
Lets a cache know it will not be used any further and that it can release acquired resources


size

int size()
How big is the cache right now?

Returns:


Copyright © 2005-2012 The Apache Software Foundation. All Rights Reserved.