Module: LogStash::PluginMixins::Scheduler::SchedulerInterface
- Included in:
- RufusImpl::SchedulerAdapter
- Defined in:
- lib/logstash/plugin_mixins/scheduler.rb
Overview
Scheduler interface usable by plugins.
Instance Method Summary collapse
-
#at(timestamp, opts = {}, &task) ⇒ Object
abstract
A job object which responds to a #job_id method.
-
#cron(schedule, opts = {}, &task) ⇒ Object
abstract
A job object which responds to a #job_id method.
-
#every(period, opts = {}, &task) ⇒ Object
abstract
A job object which responds to a #job_id method.
-
#in(delay, opts = {}, &task) ⇒ Object
abstract
A job object which responds to a #job_id method.
-
#interval(interval, opts = {}, &task) ⇒ Object
abstract
A job object which responds to a #job_id method.
-
#join ⇒ Object
abstract
Blocks until all jobs are joined, including jobs that are scheduled after this join has begun blocking.
-
#release ⇒ Object
abstract
Release the scheduler: - prevents additional jobs from being registered, - and unschedules all future invocations of jobs previously registered.
-
#release! ⇒ Object
abstract
Release the scheduler: - prevents additional jobs from being registered, - and unschedules all future invocations of jobs previously registered.
-
#running? ⇒ Boolean
abstract
Is this scheduler potentially executing our jobs.
-
#terminate! ⇒ Object
abstract
Fully and immediately terminate the scheduler: - prevents additional jobs from being registered, - unschedules all future invocations of jobs previously registered, - and stops any jobs currently executing.
Instance Method Details
#at(timestamp, opts = {}, &task) ⇒ Object
Returns a job object which responds to a #job_id method.
91 |
# File 'lib/logstash/plugin_mixins/scheduler.rb', line 91 def at(, opts = {}, &task); fail NotImplementedError end |
#cron(schedule, opts = {}, &task) ⇒ Object
Returns a job object which responds to a #job_id method.
85 |
# File 'lib/logstash/plugin_mixins/scheduler.rb', line 85 def cron(schedule, opts = {}, &task); fail NotImplementedError end |
#every(period, opts = {}, &task) ⇒ Object
Returns a job object which responds to a #job_id method.
88 |
# File 'lib/logstash/plugin_mixins/scheduler.rb', line 88 def every(period, opts = {}, &task); fail NotImplementedError end |
#in(delay, opts = {}, &task) ⇒ Object
Returns a job object which responds to a #job_id method.
94 |
# File 'lib/logstash/plugin_mixins/scheduler.rb', line 94 def in(delay, opts = {}, &task); fail NotImplementedError end |
#interval(interval, opts = {}, &task) ⇒ Object
Returns a job object which responds to a #job_id method.
97 |
# File 'lib/logstash/plugin_mixins/scheduler.rb', line 97 def interval(interval, opts = {}, &task); fail NotImplementedError; end |
#join ⇒ Object
Blocks until all jobs are joined, including jobs that are scheduled after this join has begun blocking.
102 |
# File 'lib/logstash/plugin_mixins/scheduler.rb', line 102 def join; fail NotImplementedError end |
#release ⇒ Object
Release the scheduler:
- prevents additional jobs from being registered,
- and unschedules all future invocations of jobs previously registered
This operation does not block until the scheduler stops executing jobs.
110 |
# File 'lib/logstash/plugin_mixins/scheduler.rb', line 110 def release; fail NotImplementedError end |
#release! ⇒ Object
Release the scheduler:
- prevents additional jobs from being registered,
- and unschedules all future invocations of jobs previously registered
This operation attempts to WAIT until the scheduler operation completes (if supported).
118 |
# File 'lib/logstash/plugin_mixins/scheduler.rb', line 118 def release!; release end |
#running? ⇒ Boolean
Is this scheduler potentially executing our jobs.
132 |
# File 'lib/logstash/plugin_mixins/scheduler.rb', line 132 def running?; fail NotImplementedError end |
#terminate! ⇒ Object
Fully and immediately terminate the scheduler:
- prevents additional jobs from being registered,
- unschedules all future invocations of jobs previously registered,
- and stops any jobs currently executing.
126 |
# File 'lib/logstash/plugin_mixins/scheduler.rb', line 126 def terminate!; release! end |