Class: Fluent::JmxInput::TimerWatcher
- Inherits:
-
Coolio::TimerWatcher
- Object
- Coolio::TimerWatcher
- Fluent::JmxInput::TimerWatcher
- Defined in:
- lib/fluent/plugin/in_jmx.rb
Instance Method Summary collapse
-
#initialize(interval, repeat, log, &callback) ⇒ TimerWatcher
constructor
A new instance of TimerWatcher.
- #on_timer ⇒ Object
Constructor Details
#initialize(interval, repeat, log, &callback) ⇒ TimerWatcher
Returns a new instance of TimerWatcher.
78 79 80 81 82 |
# File 'lib/fluent/plugin/in_jmx.rb', line 78 def initialize(interval, repeat, log, &callback) @log = log @callback = callback super(interval, repeat) end |
Instance Method Details
#on_timer ⇒ Object
84 85 86 87 88 89 |
# File 'lib/fluent/plugin/in_jmx.rb', line 84 def on_timer @callback.call rescue => e @log.error e.to_s @log.error_backtrace end |