public class ExpirableSet<K>
extends Object
-
Constructor Summary
Constructors
-
Method Summary
boolean
void
boolean
long
void
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
ExpirableSet
public ExpirableSet(long duration,
TimeUnit unit,
boolean expireAfterAccess)
-
Method Details
-
add
public boolean add(K key)
-
getTimeLeft
public long getTimeLeft(K key)
-
clear
public void clear()
-
contains
public boolean contains(K key)
-
remove
public void remove(K key)