Class CounterStorageKeyComparator
java.lang.Object
net.shibboleth.idp.consent.logic.impl.CounterStorageKeyComparator
- All Implemented Interfaces:
Comparator<String>
A
Comparator
used to order storage keys so that the least used and oldest storage keys are returned first.
The constructor for this class accepts two arguments : (1) the storage keys in order of oldest first and (2) the
number of times the storage keys were used.-
Field Summary
FieldsModifier and TypeFieldDescriptionMap of storage keys to counters.private final org.slf4j.Logger
Class logger.Storage keys in FIFO order. -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Field Details
-
log
@Nonnull private final org.slf4j.Logger logClass logger. -
storageKeys
Storage keys in FIFO order. -
keyToCounterMap
Map of storage keys to counters.
-
-
Constructor Details
-
CounterStorageKeyComparator
Constructor.- Parameters:
keys
- storage keys in FIFO ordermap
- number of times the storage keys were used
-
-
Method Details
-
compare
- Specified by:
compare
in interfaceComparator<String>
-