scheduleExpiration(node, System.nanoTime() + defaultExpirationTimeInNs);
}
+ public synchronized void remove(Node node) {
+ if (disposed)
+ return;
+ Long expTime = exp.get(node);
+ if (expTime != null) {
+ expirationTimes.remove(expTime);
+ }
+ map.remove(node);
+ }
+
+ public synchronized void clear() {
+ if (disposed)
+ return;
+ expirationTimes.clear();
+ exp.clear();
+ map.clear();
+ }
+
public synchronized void dispose() {
disposed = true;
expirationTimes.clear();