Type Alias IReaderSemaphoreAdapterState

IReaderSemaphoreAdapterState: {
    acquiredSlots: Map<string, Date | null>;
    limit: number;
}

Represents the persistent state of a reader semaphore in storage. Contains information about the slot limit and currently acquired slots with their expiration times.

IMPORT_PATH: "@daiso-tech/core/shared-lock/contracts"

Type declaration

  • acquiredSlots: Map<string, Date | null>

    A map of currently acquired reader slot IDs to their expiration dates. A null value indicates an indefinite slot with no expiration. Iteration order is not guaranteed and should not be relied upon.

  • limit: number

    Maximum number of concurrent reader slots available.