Class AutoSemaphoreImpl.TokenImpl
java.lang.Object
org.tquadrat.foundation.lang.internal.AutoSemaphoreImpl.TokenImpl
- All Implemented Interfaces:
AutoCloseable, AutoSemaphore.Token
- Enclosing class:
AutoSemaphoreImpl
@ClassVersion(sourceVersion="$Id: AutoSemaphoreImpl.java 1258 2026-06-04 18:33:06Z tquadrat $")
@API(status=INTERNAL,
since="0.25.2")
public final class AutoSemaphoreImpl.TokenImpl
extends Object
implements AutoSemaphore.Token
The implementation of
AutoSemaphore.Token.
- Author:
- Thomas Thrien (thomas.thrien@tquadrat.org)
- Version:
- $Id: AutoSemaphoreImpl.java 1258 2026-06-04 18:33:06Z tquadrat $
- Since:
- 0.25.2
- UML Diagram
-
UML Diagram for "org.tquadrat.foundation.lang.internal.AutoSemaphoreImpl.TokenImpl"
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intThe 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
-
TokenImpl
Creates a new instance ofTokenImpl.- Parameters:
permits- The number of the acquired permits.
-
-
Method Details
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceAutoSemaphore.Token
-
getSemaphore
Returns the semaphore that is connected to this token instance.- Specified by:
getSemaphorein interfaceAutoSemaphore.Token- Returns:
- The semaphore.
-
