Sha256: c2e17c8dd2fc76574583372cfe77b299a51476dd9d53026d824e5ea6f46e01b7

Contents?: true

Size: 1 KB

Versions: 47

Compression:

Stored size: 1 KB

Contents

# encoding: utf-8
require "logstash/instrument/periodic_poller/dlq"
require "logstash/instrument/periodic_poller/os"
require "logstash/instrument/periodic_poller/jvm"
require "logstash/instrument/periodic_poller/pq"

module LogStash module Instrument
  # Each PeriodPoller manager his own thread to do the poller
  # of the stats, this class encapsulate the starting and stopping of the poller
  # if the unique timer uses too much resource we can refactor this behavior here.
  class PeriodicPollers
    attr_reader :metric

    def initialize(metric, queue_type, agent)
      @metric = metric
      @periodic_pollers = [PeriodicPoller::Os.new(metric),
                           PeriodicPoller::JVM.new(metric),
                           PeriodicPoller::PersistentQueue.new(metric, queue_type, agent),
                           PeriodicPoller::DeadLetterQueue.new(metric, agent)]
    end

    def start
      @periodic_pollers.map(&:start)
    end

    def stop
      @periodic_pollers.map(&:stop)
    end
  end
end; end

Version data entries

47 entries across 47 versions & 1 rubygems

Version Path
logstash-core-6.8.23-java lib/logstash/instrument/periodic_pollers.rb
logstash-core-6.8.22-java lib/logstash/instrument/periodic_pollers.rb
logstash-core-6.8.21-java lib/logstash/instrument/periodic_pollers.rb
logstash-core-6.8.20-java lib/logstash/instrument/periodic_pollers.rb
logstash-core-6.8.19-java lib/logstash/instrument/periodic_pollers.rb
logstash-core-6.8.18-java lib/logstash/instrument/periodic_pollers.rb
logstash-core-6.8.17-java lib/logstash/instrument/periodic_pollers.rb
logstash-core-6.8.16-java lib/logstash/instrument/periodic_pollers.rb
logstash-core-6.8.15-java lib/logstash/instrument/periodic_pollers.rb
logstash-core-6.8.14-java lib/logstash/instrument/periodic_pollers.rb
logstash-core-6.8.13-java lib/logstash/instrument/periodic_pollers.rb
logstash-core-6.8.12-java lib/logstash/instrument/periodic_pollers.rb
logstash-core-6.8.11-java lib/logstash/instrument/periodic_pollers.rb
logstash-core-6.8.10-java lib/logstash/instrument/periodic_pollers.rb
logstash-core-6.8.9-java lib/logstash/instrument/periodic_pollers.rb
logstash-core-6.8.8-java lib/logstash/instrument/periodic_pollers.rb
logstash-core-6.8.7-java lib/logstash/instrument/periodic_pollers.rb
logstash-core-7.5.2-java lib/logstash/instrument/periodic_pollers.rb
logstash-core-7.5.1-java lib/logstash/instrument/periodic_pollers.rb
logstash-core-6.8.6-java lib/logstash/instrument/periodic_pollers.rb