ExpirationNode

@ApiStatus.Experimental
@ApiStatus.AvailableSince(value = "5.0.0")
data class ExpirationNode<E> : Expireable<E>

A representation of an element in an ExpirationCollection. This element holds the element itself, the time it was added, and the time it will expire, and its callback. This also acts as a node in a linked list.

Parameters

E

The type of element in the collection.

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
var next: ExpirationNode<E>? = null

The next node in the linked list.

Link copied to clipboard

The ExpirationCallback which might be executed when the element expires.

Link copied to clipboard
var previous: ExpirationNode<E>? = null

The previous node in the linked list.

Link copied to clipboard
open override val startTime: Instant

The time the element was created/added.

Link copied to clipboard
open override val value: E

The element.