Options
All
  • Public
  • Public/Protected
  • All
Menu

Class RedisBloomCMK

Hierarchy

  • Module
    • RedisBloomCMK

Index

Constructors

  • new RedisBloomCMK(clusterNodes: ClusterNode[], moduleOptions?: RedisModuleOptions, clusterOptions?: ClusterOptions): RedisBloomCMK
  • new RedisBloomCMK(redisOptions: RedisOptions, moduleOptions?: RedisModuleOptions): RedisBloomCMK
  • Initializing the module object

    Parameters

    • clusterNodes: ClusterNode[]

      The nodes of the cluster

    • Optional moduleOptions: RedisModuleOptions

      The additional module options

    • Optional clusterOptions: ClusterOptions

      The options of the clusters

    Returns RedisBloomCMK

  • Initializing the module object

    Parameters

    • redisOptions: RedisOptions

      The options of the redis database

    • Optional moduleOptions: RedisModuleOptions

      The additional module options

    Returns RedisBloomCMK

Properties

bloomCmkCommander: BloomCmkCommander = ...
cluster: Cluster
clusterNodes: ClusterNode[]
clusterOptions: ClusterOptions
isHandleError: boolean
name: string
redis: Redis
redisOptions: RedisOptions
returnRawResponse: boolean
showDebugLogs: boolean

Methods

  • connect(): Promise<void>
  • Connecting to the Redis database with the module

    Returns Promise<void>

  • disconnect(): Promise<void>
  • Disconnecting from the Redis database with the module

    Returns Promise<void>

  • handleError(error: string): any
  • Handling a error

    Parameters

    • error: string

      The message of the error

    Returns any

  • handleResponse(response: any): any
  • Simpilizing the response of the Module command

    Parameters

    • response: any

      The array response from the module

    Returns any

  • info(key: string): Promise<string[]>
  • initbydim(key: string, width: number, depth: number): Promise<"OK">
  • Initializes a Count-Min Sketch to dimensions specified by user.

    Parameters

    • key: string

      The name of the sketch.

    • width: number

      The number of counter in each array. Reduces the error size.

    • depth: number

      The number of counter-arrays. Reduces the probability for an error of a certain size (percentage of total count).

    Returns Promise<"OK">

  • initbyprob(key: string, errorSize: number, probability: number): Promise<"OK">
  • Initializes a Count-Min Sketch to accommodate requested capacity.

    Parameters

    • key: string

      The name of the sketch.

    • errorSize: number

      Estimate size of error. The error is a percent of total counted items. This effects the width of the sketch.

    • probability: number

      The desired probability for inflated count.

    Returns Promise<"OK">

  • isOnlyTwoDimensionalArray(array: any[]): boolean
  • Check if array is fully two dimensional. Only items in the array are arrays.

    Parameters

    • array: any[]

      The potential two dimensional array

    Returns boolean

  • merge(dest: string, numKeys: number, sources: string[], weights?: number[]): Promise<"OK">
  • Merges several sketches into one sketch.

    Parameters

    • dest: string

      The name of destination sketch.

    • numKeys: number

      The number of sketches to be merged.

    • sources: string[]

      The names of source sketches to be merged.

    • Optional weights: number[]

      A multiple of each sketch. Default =1.

    Returns Promise<"OK">

  • paramToString(paramValue: string): string
  • Formatting given param value to string

    Parameters

    • paramValue: string

      The given param value

    Returns string

    A param value converted to string

  • query(key: string, items: string[]): Promise<number[]>
  • reduceArrayDimension(array: any[][]): any[]
  • Reducing an array by one level. i.e. from two dimensional to 1 dimensional.

    Parameters

    • array: any[][]

      The potentional two dimensional array

    Returns any[]

  • sendCommand(data: CommandData): Promise<any>
  • Running a Redis command

    Parameters

    • data: CommandData

      The command data of a command to send. Consists of command and args.

    Returns Promise<any>

Generated using TypeDoc