Updates 'Contributing to Logstash' with information on new plugin stop APIs.

Fixes #4041
This commit is contained in:
Paul Echeverri 2015-10-14 18:10:33 -07:00 committed by Jordan Sissel
parent 1af2873c8d
commit 27809eaff5

View file

@ -19,6 +19,20 @@ deploying your own plugins:
* http://www.elasticsearch.org/guide/en/logstash/current/_how_to_write_a_logstash_filter_plugin.html[How to write a Logstash filter plugin]
* http://www.elasticsearch.org/guide/en/logstash/current/_how_to_write_a_logstash_output_plugin.html[How to write a Logstash output plugin]
==== Plugin API Changes added[2.0]
The 2.0 release of Logstash changes how input plugins shut down to increase shutdown reliability. There are three methods
for plugin shutdown: `stop`, `stop?`, and `close`.
* Call the `stop` method from outside the plugin thread. This method signals the plugin to stop.
* The `stop?` method returns `true` when the `stop` method has already been called for that plugin.
* The `close` method performs final bookkeeping and cleanup after the plugin's `run` method and the plugin's thread both
exit. The `close` method is a a new name for the method known as `teardown` in previous versions of Logstash.
The `shutdown`, `finished`, `finished?`, `running?`, and `terminating?` methods are redundant and no longer present in the
Plugin Base class.
[float]
=== Extending Logstash core