Sha256: 5f6c1301e1e9c1a1a3d6c1b72965eacd52ff2db8c082c0a46ecf94346f6a5100

Contents?: true

Size: 1.01 KB

Versions: 80

Compression:

Stored size: 1.01 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, pipelines)
      @metric = metric
      @periodic_pollers = [PeriodicPoller::Os.new(metric),
                           PeriodicPoller::JVM.new(metric),
                           PeriodicPoller::PersistentQueue.new(metric, queue_type, pipelines),
                           PeriodicPoller::DeadLetterQueue.new(metric, pipelines)]
    end

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

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

Version data entries

80 entries across 80 versions & 5 rubygems

Version Path
logstash-output-scalyr-0.1.9 vendor/bundle/jruby/2.5.0/gems/logstash-core-5.6.4-java/lib/logstash/instrument/periodic_pollers.rb
logstash-output-scalyr-0.1.8 vendor/bundle/jruby/2.5.0/gems/logstash-core-5.6.4-java/lib/logstash/instrument/periodic_pollers.rb
logstash-output-scalyr-0.1.7 vendor/bundle/jruby/2.5.0/gems/logstash-core-5.6.4-java/lib/logstash/instrument/periodic_pollers.rb
logstash-output-scalyr-0.1.6 vendor/bundle/jruby/2.5.0/gems/logstash-core-5.6.4-java/lib/logstash/instrument/periodic_pollers.rb
logstash-output-newrelic-1.2.0 vendor/bundle/jruby/2.5.0/gems/logstash-core-5.6.4-java/lib/logstash/instrument/periodic_pollers.rb
logstash-filter-csharp-0.2.1 vendor/bundle/jruby/2.5.0/gems/logstash-core-5.6.4-java/lib/logstash/instrument/periodic_pollers.rb
logstash-filter-csharp-0.2.0 vendor/bundle/jruby/2.5.0/gems/logstash-core-5.6.4-java/lib/logstash/instrument/periodic_pollers.rb
logstash-output-scalyr-0.1.5 vendor/bundle/jruby/2.5.0/gems/logstash-core-5.6.4-java/lib/logstash/instrument/periodic_pollers.rb
logstash-output-scalyr-0.1.4 vendor/bundle/jruby/2.5.0/gems/logstash-core-5.6.4-java/lib/logstash/instrument/periodic_pollers.rb
logstash-output-scalyr-0.1.3 vendor/bundle/jruby/2.5.0/gems/logstash-core-5.6.4-java/lib/logstash/instrument/periodic_pollers.rb
logstash-output-scalyr-0.1.2 vendor/bundle/jruby/2.5.0/gems/logstash-core-5.6.4-java/lib/logstash/instrument/periodic_pollers.rb
logstash-core-5.6.16-java lib/logstash/instrument/periodic_pollers.rb
logstash-core-5.6.15-java lib/logstash/instrument/periodic_pollers.rb
logstash-core-6.6.0-java lib/logstash/instrument/periodic_pollers.rb
logstash-core-7.0.0.alpha2-java lib/logstash/instrument/periodic_pollers.rb
logstash-core-6.5.4-java lib/logstash/instrument/periodic_pollers.rb
logstash-core-6.5.3-java lib/logstash/instrument/periodic_pollers.rb
logstash-core-5.6.14-java lib/logstash/instrument/periodic_pollers.rb
logstash-core-6.5.2-java lib/logstash/instrument/periodic_pollers.rb
logstash-core-6.5.1-java lib/logstash/instrument/periodic_pollers.rb