Class: LogStash::PipelineAction::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/logstash/pipeline_action/base.rb

Direct Known Subclasses

Create, Reload, Stop

Instance Method Summary collapse

Instance Method Details

#<=>(other) ⇒ Object



24
25
26
27
# File 'lib/logstash/pipeline_action/base.rb', line 24

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

#execute(agent, pipelines_registry) ⇒ Object



15
16
17
# File 'lib/logstash/pipeline_action/base.rb', line 15

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

#execution_priorityObject

See the definition in ‘logstash/pipeline_action.rb` for the default ordering



20
21
22
# File 'lib/logstash/pipeline_action/base.rb', line 20

def execution_priority
  ORDERING.fetch(self.class)
end

#inspectObject Also known as: to_s

Only used for debugging purpose and in the logger statement.



10
11
12
# File 'lib/logstash/pipeline_action/base.rb', line 10

def inspect
  "#{self.class.name}/pipeline_id:#{pipeline_id}"
end