Class: Hyperion::Riak::OptimizedRangeFilters

Inherits:
Object
  • Object
show all
Defined in:
lib/hyperion/riak/optimized_range_filters.rb

Instance Method Summary collapse

Constructor Details

#initialize(filters) ⇒ OptimizedRangeFilters

Returns a new instance of OptimizedRangeFilters.



4
5
6
# File 'lib/hyperion/riak/optimized_range_filters.rb', line 4

def initialize(filters)
  @filters = filters
end

Instance Method Details

#greater_than_filterObject



16
17
18
# File 'lib/hyperion/riak/optimized_range_filters.rb', line 16

def greater_than_filter
  @greater_than_filter ||= find_first_match(greater_than_candidates, less_than_candidates)
end

#less_than_filterObject



12
13
14
# File 'lib/hyperion/riak/optimized_range_filters.rb', line 12

def less_than_filter
  @less_than_filter ||= find_first_match(less_than_candidates, greater_than_candidates)
end

#remaining_filtersObject



8
9
10
# File 'lib/hyperion/riak/optimized_range_filters.rb', line 8

def remaining_filters
  @remaining_filters ||= @filters - [less_than_filter, greater_than_filter]
end