Options
All
  • Public
  • Public/Protected
  • All
Menu

Class RedisHashBackend

We use MULTI and open a new client every time (on each read and increase operation) because we want to ensure atomicity.

Hierarchy

Implements

Index

Constructors

constructor

Properties

maximum

maximum: IndType

Private redisCredentials

redisCredentials: RedisCredentials | null

redisKey

redisKey: string

Methods

Private atomic

  • atomic(incQueries: keyof IncreaseQuery[] | null, readQueries: keyof IndType[] | null): Promise<ReadonlyArray<ValType | null>>
  • Parameters

    • incQueries: keyof IncreaseQuery[] | null
    • readQueries: keyof IndType[] | null

    Returns Promise<ReadonlyArray<ValType | null>>

Protected getNewRedisClient

  • getNewRedisClient(): Promise<RedisClient>

increase

  • increase(queries: keyof IncreaseQuery[]): Promise<ReadonlyArray<number | null>>
  • Parameters

    • queries: keyof IncreaseQuery[]

    Returns Promise<ReadonlyArray<number | null>>

read

  • read(queries: keyof IndType[]): Promise<keyof ValType[]>

Generated using TypeDoc