public class SuppressCache<T>
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
SuppressCache.Value |
Modifier and Type | Field and Description |
---|---|
protected java.util.concurrent.ConcurrentMap<T,SuppressCache.Value> |
map |
protected T |
NULL_KEY |
Constructor and Description |
---|
SuppressCache() |
Modifier and Type | Method and Description |
---|---|
void |
clear() |
SuppressCache.Value |
putIfAbsent(T key,
long expiry_time)
Adds a new key to the hashmap, or updates the Value associated with the existing key if present.
|
void |
removeAll(java.util.Collection<T> list) |
void |
removeExpired(long expiry_time) |
void |
retainAll(java.util.Collection<T> list) |
int |
size()
Returns the total count of all values
|
java.lang.String |
toString() |
protected final java.util.concurrent.ConcurrentMap<T,SuppressCache.Value> map
protected final T NULL_KEY
public SuppressCache.Value putIfAbsent(T key, long expiry_time)
key
- The keyexpiry_time
- Expiry time (in ms)public void clear()
public void retainAll(java.util.Collection<T> list)
public void removeAll(java.util.Collection<T> list)
public void removeExpired(long expiry_time)
public int size()
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 1998-2020 Red Hat. All Rights Reserved.