DWS Packages
    Preparing search index...

    Class KvStoreAbstract

    Abstract base class for key-value store adapters.

    Provides static validation helpers. Subclasses implement the public methods directly and call the validators as needed.

    Hierarchy (View Summary)

    Index

    Constructors

    Methods

    • Returns number | Promise<number>

    • Returns void | Promise<void>

    • Returns void | Promise<void>

    • Parameters

      • key: string
      • Optionalamount: number

      Returns number | Promise<number>

    • Parameters

      • key: string

      Returns boolean | Promise<boolean>

    • Parameters

      • key: string
      • ttlSec: number

      Returns boolean | Promise<boolean>

    • Type Parameters

      • T = unknown

      Parameters

      • key: string

      Returns T | Promise<T | null> | null

    • Parameters

      • key: string
      • Optionalamount: number

      Returns number | Promise<number>

    • Type Parameters

      • T = unknown

      Parameters

      • key: string
      • value: T
      • OptionalttlSec: number

      Returns void | Promise<void>

    • Parameters

      • key: string

      Returns number | Promise<number>

    • Validates an increment/decrement amount and throws an exception if it's invalid.

      Parameters

      • amount: number

        The amount to validate.

      Returns void

      (Exception) - If the amount is invalid.

    • Validates a key string and throws an exception if it's invalid.

      Parameters

      • key: string

        The key to validate.

      Returns void

      (Exception) - If the key is invalid.

    • Validates a TTL value and throws an exception if it's invalid.

      Parameters

      • ttlSec: number | undefined

        The TTL value to validate.

      Returns void

      (Exception) - If the TTL is invalid.