Package-level declarations

Types

Link copied to clipboard

Represents an in-memory state of a semaphore.

Link copied to clipboard
abstract class SemaphoreState : AutoCloseable

Represents the abstract state of a semaphore used by a RateLimiter which, depending on the implementation, can be stored in-memory or externally (e.g., in a database or cache). Additionally, an internal queue is used to store the requests that are waiting for permits to be available. If this state is to be shared between multiple instances of the rate limiter, it should be thread-safe. If not, it is protected by the rate limiter's internal synchronization mechanisms.