Type Alias SharedLockFactoryCreateSettings

SharedLockFactoryCreateSettings: {
    limit: number;
    lockId?: string;
    ttl?: ITimeSpan | null;
}

Configuration settings for creating a shared lock instance through the factory.

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

Type declaration

  • limit: number

    Maximum number of concurrent readers that can hold a read lock simultaneously. This defines the semaphore limit for the reader component of the shared lock.

  • OptionallockId?: string

    Custom identifier for this shared-lock holder. Used to uniquely identify writer ownership and reader slot ownership. If not specified, a unique identifier will be automatically generated.

  • Optionalttl?: ITimeSpan | null

    Time-to-live (TTL) duration for the locks. When set, locks will automatically expire after this duration if not refreshed. Pass null to create locks without automatic expiration.