ExpirationMap
@ApiStatus.Experimental
@ApiStatus.AvailableSince(value = "5.0.0")
The basic implementation of an expiring map.
Parameters
K
The key type in the map.
V
The value type in the map.
Functions
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Provides the remaining time of until the element's expiration
Link copied to clipboard
Link copied to clipboard
abstract fun setExpiration(key: K, expireIn: Duration, onExpiration: ExpirationMapCallback<K, V>? = null): Boolean
Sets the element's expiration
Link copied to clipboard
Sets the element's expiration callback, overriding any existing callback.
Properties
Link copied to clipboard
This MutableCollection will not reflect any changes made to the map.
Inheritors
Extensions
Link copied to clipboard
@API(status = API.Status.EXPERIMENTAL)
Link copied to clipboard
inline fun <K, V> MutableMap<K, V>.computeAndRemove(key: K, crossinline onRemove: suspend V.() -> Unit): Boolean