Interface SelfExpiringMap<K,V>
- All Superinterfaces:
Map<K,V>
- All Known Implementing Classes:
SelfExpiringHashMap
An implementation of Map interface with expiring
keys feature.
- Author:
- Despical
Created at 6.02.2024
-
Nested Class Summary
-
Method Summary
Methods inherited from interface java.util.Map
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
Method Details
-
put
Associates the specified value with the specified key in this map. If the map previously contained a mapping for the key, the old value is replaced.- Parameters:
key- key with which the specified value is to be associatedvalue- value to be associated with the specified keylifeTimeMs- how many milliseconds should the key live- Returns:
- the previous value associated with
key, ornullif there was no mapping forkey. (Anullreturn can also indicate that the map previously associatednullwithkey.)
-