Options
All
  • Public
  • Public/Protected
  • All
Menu

Class RedisBloomCuckoo

Hierarchy

  • Module
    • RedisBloomCuckoo

Index

Constructors

  • new RedisBloomCuckoo(clusterNodes: ClusterNode[], moduleOptions?: RedisModuleOptions, clusterOptions?: ClusterOptions): RedisBloomCuckoo
  • new RedisBloomCuckoo(redisOptions: RedisOptions, moduleOptions?: RedisModuleOptions): RedisBloomCuckoo
  • 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 RedisBloomCuckoo

  • Initializing the module object

    Parameters

    • redisOptions: RedisOptions

      The options of the redis database

    • Optional moduleOptions: RedisModuleOptions

      The additional module options

    Returns RedisBloomCuckoo

Properties

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

Methods

  • add(key: string, item: string): Promise<CFResponse>
  • addnx(key: string, item: string): Promise<CFResponse>
  • connect(): Promise<void>
  • Connecting to the Redis database with the module

    Returns Promise<void>

  • count(key: string, item: string): Promise<number>
  • del(key: string, item: string): Promise<CFResponse>
  • Deleting an item once from the filter. If the item exists only once, it will be removed from the filter.

    Parameters

    • key: string

      The name of the filter

    • item: string

      The item to delete from the filter

    Returns Promise<CFResponse>

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

    Returns Promise<void>

  • exists(key: string, item: string): Promise<CFResponse>
  • 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[]>
  • Adding one or more items to a cuckoo filter, allowing the filter to be created with a custom capacity if it does not yet exist.

    Parameters

    • key: string

      The name of the filter

    • items: string[]

      Begin the list of items to add

    • Optional options: CFInsertParameters

      The additional optional parameters of the 'CF.INSERT' command

    Returns Promise<CFResponse[]>

  • Adding one or more items to a cuckoo filter, allowing the filter to be created with a custom capacity if it does not yet exist.

    Parameters

    • key: string

      The name of the filter

    • items: string[]

      The items of the 'CF.INSERT' command

    • Optional options: CFInsertParameters

      The additional optional parameters of the 'CF.INSERTNX' command

    Returns Promise<CFResponse[]>

  • 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

  • loadchunk(key: string, iterator: number, data: string): Promise<"OK">
  • Restoring a filter previously saved using SCANDUMP.

    Parameters

    • key: string

      The name of the key to restore

    • iterator: number

      The iterator value associated with data (returned by SCANDUMP )

    • data: string

      The current data chunk (returned by SCANDUMP )

    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

  • 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[]

  • Creating an empty Bloom Cuckoo filter with a given initial capacity.

    Parameters

    • key: string

      The key under which the filter is to be found

    • capacity: number

      The number of entries you intend to add to the filter. Performance will begin to degrade after adding more items than this number. The actual degradation will depend on how far the limit has been exceeded. Performance will degrade linearly as the number of entries grow exponentially.

    • Optional options: CFReserveParameters

      The additional optional parameters

    Returns Promise<"OK">

  • scandump(key: string, iterator: number): Promise<string[]>
  • Begining an incremental save of the Cuckoo filter

    Parameters

    • key: string

      The name of the filter

    • iterator: number

      Iterator value. This is either 0, or the iterator from a previous invocation of this command

    Returns Promise<string[]>

  • 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