Class: LeoManager::CompactionStatus
- Inherits:
-
Object
- Object
- LeoManager::CompactionStatus
- Defined in:
- lib/leo_manager_models.rb
Overview
Compaction Status Model
Instance Attribute Summary collapse
-
#last_compaction_start ⇒ Object
readonly
Returns the value of attribute last_compaction_start.
-
#num_of_ongoing_targets ⇒ Object
readonly
Returns the value of attribute num_of_ongoing_targets.
-
#num_of_out_of_targets ⇒ Object
readonly
Returns the value of attribute num_of_out_of_targets.
-
#num_of_pending_targets ⇒ Object
readonly
Returns the value of attribute num_of_pending_targets.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#total_targets ⇒ Object
readonly
Returns the value of attribute total_targets.
Instance Method Summary collapse
-
#initialize(h) ⇒ CompactionStatus
constructor
A new instance of CompactionStatus.
Constructor Details
#initialize(h) ⇒ CompactionStatus
313 314 315 316 317 318 319 320 321 322 323 324 325 326 |
# File 'lib/leo_manager_models.rb', line 313 def initialize(h) @status = h[:status] @total_targets = h[:total_targets] @num_of_pending_targets = h[:num_of_pending_targets] @num_of_ongoing_targets = h[:num_of_ongoing_targets] @num_of_out_of_targets = h[:num_of_out_of_targets] last_compaction_start = h[:last_compaction_start] if last_compaction_start == "____-__-__ __:__:__" @last_compaction_start = nil # you have never done compaction else @last_compaction_start = Time.parse(last_compaction_start) end end |
Instance Attribute Details
#last_compaction_start ⇒ Object (readonly)
Returns the value of attribute last_compaction_start.
309 310 311 |
# File 'lib/leo_manager_models.rb', line 309 def last_compaction_start @last_compaction_start end |
#num_of_ongoing_targets ⇒ Object (readonly)
Returns the value of attribute num_of_ongoing_targets.
309 310 311 |
# File 'lib/leo_manager_models.rb', line 309 def num_of_ongoing_targets @num_of_ongoing_targets end |
#num_of_out_of_targets ⇒ Object (readonly)
Returns the value of attribute num_of_out_of_targets.
309 310 311 |
# File 'lib/leo_manager_models.rb', line 309 def num_of_out_of_targets @num_of_out_of_targets end |
#num_of_pending_targets ⇒ Object (readonly)
Returns the value of attribute num_of_pending_targets.
309 310 311 |
# File 'lib/leo_manager_models.rb', line 309 def num_of_pending_targets @num_of_pending_targets end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
309 310 311 |
# File 'lib/leo_manager_models.rb', line 309 def status @status end |
#total_targets ⇒ Object (readonly)
Returns the value of attribute total_targets.
309 310 311 |
# File 'lib/leo_manager_models.rb', line 309 def total_targets @total_targets end |