Interface SelfExpiringMap<K,V>

All Superinterfaces:
Map<K,V>
All Known Implementing Classes:
SelfExpiringHashMap

@Internal public interface SelfExpiringMap<K,V> extends Map<K,V>
An implementation of Map interface with expiring keys feature.
Author:
Despical

Created at 6.02.2024

  • Method Details

    • put

      V put(K key, V value, long lifeTimeMs)
      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 associated
      value - value to be associated with the specified key
      lifeTimeMs - how many milliseconds should the key live
      Returns:
      the previous value associated with key, or null if there was no mapping for key. (A null return can also indicate that the map previously associated null with key.)