Class: Fluent::RootAgent::SourceOnlyMode
- Inherits:
-
Object
- Object
- Fluent::RootAgent::SourceOnlyMode
- Defined in:
- lib/fluent/root_agent.rb
Constant Summary collapse
- DISABLED =
0- NORMAL =
1- ONLY_ZERO_DOWNTIME_RESTART_READY =
2
Instance Method Summary collapse
- #disable! ⇒ Object
- #enabled? ⇒ Boolean
-
#initialize(with_source_only, start_in_parallel) ⇒ SourceOnlyMode
constructor
A new instance of SourceOnlyMode.
- #only_zero_downtime_restart_ready? ⇒ Boolean
Constructor Details
#initialize(with_source_only, start_in_parallel) ⇒ SourceOnlyMode
Returns a new instance of SourceOnlyMode.
56 57 58 59 60 61 62 63 64 |
# File 'lib/fluent/root_agent.rb', line 56 def initialize(with_source_only, start_in_parallel) if start_in_parallel @mode = ONLY_ZERO_DOWNTIME_RESTART_READY elsif with_source_only @mode = NORMAL else @mode = DISABLED end end |
Instance Method Details
#disable! ⇒ Object
74 75 76 |
# File 'lib/fluent/root_agent.rb', line 74 def disable! @mode = DISABLED end |
#enabled? ⇒ Boolean
66 67 68 |
# File 'lib/fluent/root_agent.rb', line 66 def enabled? @mode != DISABLED end |
#only_zero_downtime_restart_ready? ⇒ Boolean
70 71 72 |
# File 'lib/fluent/root_agent.rb', line 70 def only_zero_downtime_restart_ready? @mode == ONLY_ZERO_DOWNTIME_RESTART_READY end |