Module org.tquadrat.foundation.util
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"
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final int
The number of permits to release on close. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
m_Permits
The number of permits to release on close.
-
-
Constructor Details
-
Token
Creates a new instance ofToken
.- Parameters:
permits
- The number of the acquired permits.
-
-
Method Details
-
close
- Specified by:
close
in interfaceAutoCloseable
- Throws:
Exception
-