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"
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
m_EndOfLife
The end-of-life for this permit. -
m_Id
-
m_Permits
The number of permits to release on close.
-
-
Constructor Details
-
TokenImpl
-
-
Method Details
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceAutoSemaphore.Token
-
getEndOfLife
Returns the time for the end-of-life.- Returns:
- The end-of-life instant.
-
getId
-
getPermits
Returns the number of permits for this token.- Returns:
- The number of permits.
-
getSemaphore
Returns the semaphore that is connected to this token instance.- Specified by:
getSemaphorein interfaceAutoSemaphore.Token- Returns:
- The semaphore.
-
