org.jgroups.util
Class AgeOutCache<K>
java.lang.Object
org.jgroups.util.AgeOutCache<K>
public class AgeOutCache<K>
- extends java.lang.Object
Cache which removes its elements after a certain time
- Version:
- $Id: AgeOutCache.java,v 1.1.2.2 2009/04/15 07:18:47 belaban Exp $
- Author:
- Bela Ban
Constructor Summary |
AgeOutCache(java.util.concurrent.ScheduledExecutorService timer,
long timeout)
|
AgeOutCache(java.util.concurrent.ScheduledExecutorService timer,
long timeout,
AgeOutCache.Handler handler)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
AgeOutCache
public AgeOutCache(java.util.concurrent.ScheduledExecutorService timer,
long timeout)
AgeOutCache
public AgeOutCache(java.util.concurrent.ScheduledExecutorService timer,
long timeout,
AgeOutCache.Handler handler)
getTimeout
public long getTimeout()
setTimeout
public void setTimeout(long timeout)
getHandler
public AgeOutCache.Handler getHandler()
setHandler
public void setHandler(AgeOutCache.Handler handler)
add
public void add(K key)
remove
public void remove(K key)
removeAll
public void removeAll(java.util.Collection<K> keys)
size
public int size()
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
Copyright ? 1998-2008 Bela Ban. All Rights Reserved.