- endOfPeriod
The current time period is finished. This method is called by the timer used
internally to monitor t
- getAcquireCount
Returns the number of invocations of the #acquire() method for the current
period. This may be usefu
- getExecutorService
Returns the executor service used by this instance.
- getLimit
Returns the limit enforced by this semaphore. The limit determines how many
invocations of #acquire(
- getPeriod
Returns the time period. This is the time monitored by this semaphore. Only a
given number of invoca
- getUnit
Returns the time unit. This is the unit used by #getPeriod().
- isShutdown
Tests whether the #shutdown() method has been called on this object. If this
method returns true, th
- setLimit
Sets the limit. This is the number of times the #acquire() method can be called
within the time peri
- acquirePermit
Internal helper method for acquiring a permit. This method checks whether
currently a permit can be
- prepareAcquire
Prepares an acquire operation. Checks for the current state and starts the
internal timer if necessa
- <init>
Creates a new instance of TimedSemaphore and initializes it with an executor
service, the given time
- acquire
Acquires a permit from this semaphore. This method will block if the limit for
the current period ha