Class AutoSemaphoreImpl.Token

java.lang.Object
org.tquadrat.foundation.util.internal.AutoSemaphoreImpl.Token
All Implemented Interfaces:
AutoCloseable
Enclosing class:
AutoSemaphoreImpl

@ClassVersion(sourceVersion="$Id: AutoSemaphoreImpl.java 1135 2024-05-28 21:32:48Z tquadrat $") @API(status=INTERNAL, since="0.4.8") private final class AutoSemaphoreImpl.Token extends Object implements AutoCloseable

The 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: AutoSemaphoreImpl.java 1135 2024-05-28 21:32:48Z tquadrat $
Since:
0.4.8
UML Diagram
UML Diagram for "org.tquadrat.foundation.util.internal.AutoSemaphoreImpl.Token"

UML Diagram for "org.tquadrat.foundation.util.internal.AutoSemaphoreImpl.Token"

UML Diagram for "org.tquadrat.foundation.util.internal.AutoSemaphoreImpl.Token"
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final int
    The number of permits to release on close.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Token(int permits)
    Creates a new instance of Token.
  • Method Summary

    Modifier and Type
    Method
    Description
    final void

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • m_Permits

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

    • Token

      public Token(int permits)
      Creates a new instance of Token.
      Parameters:
      permits - The number of the acquired permits.
  • Method Details