-
- All Implemented Interfaces:
-
kotlin.collections.Collection,kotlin.collections.Iterable,kotlin.collections.MutableCollection,kotlin.collections.MutableIterable,kotlin.collections.MutableSet,kotlin.collections.Set
public final class ConcurrentPassiveExpiringSet<E extends Object> implements Set<E>
Decorates a <code>Set</code> to evict expired entries once their expiration time has been reached.
Constructs a map decorator that decorates the given map and results in entries NEVER expiring. If there are any elements already in the map being decorated, they also will NEVER expire.
-
-
Constructor Summary
Constructors Constructor Description ConcurrentPassiveExpiringSet(Duration ttl)
-
Method Summary
Modifier and Type Method Description IntegergetSize()final DurationgetTtl()Booleanadd(E element)Booleanremove(E element)Unitclear()Booleancontains(E element)BooleancontainsAll(Collection<E> elements)BooleanisEmpty()Iterator<E>iterator()BooleanaddAll(Collection<E> elements)BooleanremoveAll(Collection<E> elements)BooleanretainAll(Collection<E> elements)<T extends Any> Array<out T>toArray(IntFunction<Array<T>> generator)Booleanequals(Object other)IntegerhashCode()-
Methods inherited from class kotlin.collections.Collection
forEach -
Methods inherited from class kotlin.collections.Set
parallelStream, stream -
Methods inherited from class kotlin.collections.MutableSet
removeIf, spliterator -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
ConcurrentPassiveExpiringSet
ConcurrentPassiveExpiringSet(Duration ttl)
-
-
Method Detail
-
containsAll
Boolean containsAll(Collection<E> elements)
-
addAll
Boolean addAll(Collection<E> elements)
-
removeAll
Boolean removeAll(Collection<E> elements)
-
retainAll
Boolean retainAll(Collection<E> elements)
-
-
-
-