Class: BloomFilter

caching.BloomFilter(bloomFilter)

A Bloom Filter is a client-side kept cache sketch of the server cache

Constructor

new BloomFilter(bloomFilter)

Parameters:
Name Type Description
bloomFilter Object

The raw Bloom filter.

Properties
Name Type Description
m number

The raw Bloom filter bits.

h number

The raw Bloom filter hashes.

b string

The Base64-encoded raw Bloom filter bytes.

Source:

Members

(readonly) bits :number

The amount of bits.

Type:
  • number
Source:

(readonly) bytes :string

The raw bytes of this Bloom filter.

Type:
  • string
Source:

(readonly) creation :number

The creation timestamp of this bloom filter.

Type:
  • number
Source:

(readonly) hashes :number

The amount of hashes.

Type:
  • number
Source:

Methods

contains(element) → {boolean}

Returns whether this Bloom filter contains the given element.

Parameters:
Name Type Description
element string

The element to check if it is contained.

Source:
Returns:

True, if the element is contained in this Bloom filter.

Type
boolean