timeout

@CheckReturnValue
open fun timeout(timeout: Long, timeoutUnit: TimeUnit): T(source)

Sets the timeout on this component, invalidating the component 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.

Parameters

timeout

The value of the timeout

timeoutUnit

The unit of the timeout


@CheckReturnValue
open fun timeout(timeout: Duration): T(source)
abstract fun timeout(timeout: Duration): T(source)

Sets the timeout on this component, invalidating the component 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.

Parameters

timeout

The duration of the timeout


abstract val timeout: ComponentTimeout?(source)