org.apache.activemq.memory
Class CacheFilter

java.lang.Object
  extended by org.apache.activemq.memory.CacheFilter
All Implemented Interfaces:
Cache
Direct Known Subclasses:
UsageManagerCacheFilter

public class CacheFilter
extends Object
implements Cache

Filters another Cache implementation.


Field Summary
protected  Cache next
           
 
Constructor Summary
CacheFilter(Cache next)
           
 
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

next

protected final Cache next
Constructor Detail

CacheFilter

public CacheFilter(Cache next)
Method Detail

put

public Object put(Object key,
                  Object value)
Description copied from interface: Cache
Puts an object into the cache.

Specified by:
put in interface Cache

get

public Object get(Object key)
Description copied from interface: Cache
Gets an object that was previously put into this object.

Specified by:
get in interface Cache
Returns:
null if the object was not previously put or if the object has expired out of the cache.

remove

public Object remove(Object key)
Description copied from interface: Cache
Removes an object from the cache.

Specified by:
remove in interface Cache
Returns:
the object associated with the key if it was still in the cache.

close

public void close()
Description copied from interface: Cache
Lets a cache know it will not be used any further and that it can release acquired resources

Specified by:
close in interface Cache

size

public int size()
Description copied from interface: Cache
How big is the cache right now?

Specified by:
size in interface Cache
Returns:


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