ExpirationMapValue

@ApiStatus.Experimental
@ApiStatus.AvailableSince(value = "5.0.0")
data class ExpirationMapValue<K, V> : Expireable<V>

A representation of a value in an ExpirationMap. This element holds the value itself, the startTime, the expireIn time from the startTime, and its onExpire callback.

Parameters

V

The type of value in the map.

Functions

Link copied to clipboard
open operator override fun compareTo(other: Delayed?): Int
Link copied to clipboard
open override fun getDelay(unit: TimeUnit): Long
Link copied to clipboard
open fun remainingTime(current: Instant? = null): Duration

The Duration of time until the value expires.

Properties

Link copied to clipboard
open override val expireIn: Duration

How long from the current time the element will expire.

Link copied to clipboard

The ExpirationMapCallback which might be executed when the element expires.

Link copied to clipboard
open override val startTime: Instant

The time the element was created/added.

Link copied to clipboard
open override val value: V

The value.