Interface AutoSemaphore.Token

All Superinterfaces:
AutoCloseable
All Known Implementing Classes:
AutoSemaphoreImpl.TokenImpl, TimeoutSemaphoreImpl.TokenImpl
Enclosing interface:
AutoSemaphore

@ClassVersion(sourceVersion="$Id: AutoSemaphore.java 1258 2026-06-04 18:33:06Z tquadrat $") @API(status=STABLE, since="0.25.2") public static sealed interface AutoSemaphore.Token extends AutoCloseable permits AutoSemaphoreImpl.TokenImpl, TimeoutSemaphoreImpl.TokenImpl

The definition of a token that holds the permits to be released when a try-with-resources block is left.

Author:
Thomas Thrien (thomas.thrien@tquadrat.org)
Version:
$Id: AutoSemaphore.java 1258 2026-06-04 18:33:06Z tquadrat $
Since:
0.25.2
UML Diagram
UML Diagram for "org.tquadrat.foundation.lang.AutoSemaphore.Token"

UML Diagram for "org.tquadrat.foundation.lang.AutoSemaphore.Token"

UML Diagram for "org.tquadrat.foundation.lang.AutoSemaphore.Token"
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Returns the semaphore that is connected to this token instance.