class LogStash::Filters::FetchStrategy::File::Exact

Public Class Methods

new(dictionary, rw_lock) click to toggle source
# File lib/logstash/filters/fetch_strategy/file.rb, line 5
def initialize(dictionary, rw_lock)
  @dictionary = dictionary
  @read_lock = rw_lock.readLock
end

Public Instance Methods

dictionary_updated() click to toggle source
# File lib/logstash/filters/fetch_strategy/file.rb, line 10
def dictionary_updated
end
fetch(source, results) click to toggle source
# File lib/logstash/filters/fetch_strategy/file.rb, line 13
def fetch(source, results)
  @read_lock.lock
  begin
    if @dictionary.include?(source)
      results[1] = LogStash::Util.deep_clone(@dictionary[source])
    else
      results[0] = false
    end
  ensure
    @read_lock.unlock
  end
end