Class TimeoutSemaphoreImpl.TokenImpl

java.lang.Object
org.tquadrat.foundation.lang.internal.TimeoutSemaphoreImpl.TokenImpl
All Implemented Interfaces:
AutoCloseable, AutoSemaphore.Token
Enclosing class:
TimeoutSemaphoreImpl

@ClassVersion(sourceVersion="$Id: TimeoutSemaphoreImpl.java 1258 2026-06-04 18:33:06Z tquadrat $") @API(status=INTERNAL, since="0.25.2") public final class TimeoutSemaphoreImpl.TokenImpl extends Object implements AutoSemaphore.Token

The token that holds the permits to be released when a try-with-resources block is left or the timeout has expired.

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

UML Diagram for "org.tquadrat.foundation.lang.internal.TimeoutSemaphoreImpl.TokenImpl"

UML Diagram for "org.tquadrat.foundation.lang.internal.TimeoutSemaphoreImpl.TokenImpl"
  • Field Details

    • m_EndOfLife

      private final Instant m_EndOfLife
      The end-of-life for this permit.
    • m_Id

      private final UUID m_Id
      The id for this permit.
    • m_Permits

      private final int m_Permits
      The number of permits to release on close.
  • Constructor Details

    • TokenImpl

      public TokenImpl(int permits, Instant endOfLife)
      Creates a new instance of TokenImpl.
      Parameters:
      permits - The number of the acquired permits.
      endOfLife - The end-of-life for this permit.
  • Method Details