Sha256: 848ee4370980e8a581cbec140f68aeb06f6a76e7a61d5165b101947f75fea6f1

Contents?: true

Size: 988 Bytes

Versions: 47

Compression:

Stored size: 988 Bytes

Contents

# encoding: utf-8
# I've decided to take the action strategy, I think this make the code a bit easier to understand.
# maybe in the context of config management we will want to have force kill on the
# threads instead of waiting forever or sending feedback to the host
#
# Some actions could be retryable, or have a delay or timeout.
module LogStash module PipelineAction
  class Base
    # Only used for debugging purpose and in the logger statement.
    def inspect
      "#{self.class.name}/pipeline_id:#{pipeline_id}"
    end
    alias_method :to_s, :inspect

    def execute(agent, pipelines_registry)
      raise "`#execute` Not implemented!"
    end

    # See the definition in `logstash/pipeline_action.rb` for the default ordering
    def execution_priority
      ORDERING.fetch(self.class)
    end

    def <=>(other)
      order = self.execution_priority <=> other.execution_priority
      order.nonzero? ? order : self.pipeline_id <=> other.pipeline_id
    end
  end
end end

Version data entries

47 entries across 47 versions & 1 rubygems

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