Class: LogStash::PipelineAction::Stop
- Defined in:
- lib/logstash/pipeline_action/stop.rb
Instance Attribute Summary collapse
-
#pipeline_id ⇒ Object
readonly
Returns the value of attribute pipeline_id.
Instance Method Summary collapse
- #execute(agent, pipelines_registry) ⇒ Object
-
#initialize(pipeline_id) ⇒ Stop
constructor
A new instance of Stop.
- #to_s ⇒ Object
Methods inherited from Base
#<=>, #execution_priority, #inspect
Constructor Details
#initialize(pipeline_id) ⇒ Stop
Returns a new instance of Stop.
8 9 10 |
# File 'lib/logstash/pipeline_action/stop.rb', line 8 def initialize(pipeline_id) @pipeline_id = pipeline_id end |
Instance Attribute Details
#pipeline_id ⇒ Object (readonly)
Returns the value of attribute pipeline_id.
6 7 8 |
# File 'lib/logstash/pipeline_action/stop.rb', line 6 def pipeline_id @pipeline_id end |
Instance Method Details
#execute(agent, pipelines_registry) ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'lib/logstash/pipeline_action/stop.rb', line 12 def execute(agent, pipelines_registry) pipelines_registry.terminate_pipeline(pipeline_id) do |pipeline| pipeline.shutdown { LogStash::ShutdownWatcher.start(pipeline) } pipeline.thread.join end LogStash::ConvergeResult::SuccessfulAction.new end |
#to_s ⇒ Object
21 22 23 |
# File 'lib/logstash/pipeline_action/stop.rb', line 21 def to_s "PipelineAction::Stop<#{pipeline_id}>" end |