Class: Wayfarer::Frontiers::RedisBloomfilter Private

Inherits:
MemoryBloomfilter show all
Defined in:
lib/wayfarer/frontiers/redis_bloomfilter.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

A Redis bloomfilter.

Instance Attribute Summary

Attributes inherited from Frontier

#config

Instance Method Summary collapse

Methods inherited from MemoryBloomfilter

#cache, #cached?, #free

Methods inherited from MemoryFrontier

#cache, #cached?, #current_uris, #free, #stage, #staged?, #staged_uris

Methods inherited from Frontier

#cache, #cached?, #current_uris, #cycle, #filter_staged_uris!, #free, #reset_staged_uris!, #stage, #staged?, #staged_uris, #swap!

Constructor Details

#initialize(config) ⇒ RedisBloomfilter

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of RedisBloomfilter.


10
11
12
13
14
# File 'lib/wayfarer/frontiers/redis_bloomfilter.rb', line 10

def initialize(config)
  @conn = Redis.new(config.redis_opts)
  @filter = BloomFilter::Redis.new(config.bloomfilter_opts.merge(db: @conn))
  super(config)
end