-
public final class ConcurrentExpiringLRUCache<K extends Object, T extends Object>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classConcurrentExpiringLRUCache.Companion
-
Constructor Summary
Constructors Constructor Description ConcurrentExpiringLRUCache(Duration ttl, Integer capacity)
-
Method Summary
Modifier and Type Method Description final ConcurrentLRUCache<K, ExpiringItem<T>>getCache()final IntegergetSize()final DurationgetTtl()final IntegergetCapacity()final Unitput(K key, ExpiringItem<T> item)final UnitputDatum(K key, T datum, Long timestamp)final ExpiringItem<T>get(K key)final TgetDatum(K key)final TgetDatum(K key, Duration expires, Instant now)final Booleancontains(K key)final TcomputeIfAbsent(K key, Function1<K, T> mappingFunction)final ExpiringItem<T>remove(K key)final UnitremoveAll(Iterable<K> keys)final Unitclear()-
-
Method Detail
-
getCache
final ConcurrentLRUCache<K, ExpiringItem<T>> getCache()
-
getCapacity
final Integer getCapacity()
-
put
final Unit put(K key, ExpiringItem<T> item)
-
get
final ExpiringItem<T> get(K key)
-
computeIfAbsent
final T computeIfAbsent(K key, Function1<K, T> mappingFunction)
-
remove
final ExpiringItem<T> remove(K key)
-
-
-
-