ITimeoutableComponent

Allows components to have timeouts.

The component will be deleted from the database on expiration.

Note: Components inside groups cannot have timeouts.

Timeout cancellation

The timeout will be canceled once a component has been deleted, including if the component was set to a single use.

Component deletion

  • If the component is a group, then all of its owned components will also be deleted.

  • If the component is inside a group, then all the group's components will also be deleted.

Inheritors

Properties

Link copied to clipboard

When true, resets the timeout duration everytime this component is used.

Functions

Link copied to clipboard
@CheckReturnValue
abstract fun noTimeout(): T

Removes the timeout from this component.

Link copied to clipboard
abstract fun resetTimeoutOnUse(resetTimeoutOnUse: Boolean): T

When true, resets the timeout duration everytime this component is used.

Link copied to clipboard
@CheckReturnValue
open fun timeout(timeout: Duration): T
abstract fun timeout(timeout: Duration): T
@CheckReturnValue
open fun timeout(timeout: Long, timeoutUnit: TimeUnit): T

Sets the timeout on this component, invalidating the component on expiration.