Class DirectTriggerService.RecentEntries<K,V>
java.lang.Object
org.chenile.trigger.DirectTriggerService.RecentEntries<K,V>
- Enclosing class:
DirectTriggerService
A thread-safe map that forgets entries after a time to live and keeps at most a fixed number of
them, dropping the oldest first. Holds the accepted keys and the statuses.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static final record -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Clockprivate final LinkedHashMap<K, DirectTriggerService.RecentEntries.Entry<V>> private final intprivate final Duration -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
entries
-
timeToLive
-
maxEntries
private final int maxEntries -
clock
-
-
Constructor Details
-
RecentEntries
-
-
Method Details
-
putIfAbsent
-
get
-
put
-
remove
-
evict
private void evict()
-
CHENILE