Class: Rafflesia::CacheWarmData
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::CacheWarmData
- Defined in:
- lib/rafflesia/cache/cache_warm_data.rb
Constant Summary collapse
- HASH_ATTRS =
{ all_cache_hits: :all_cache_hits, continue_on_error: :continue_on_error, failed_count: :failed_count, object_storage_backends: :object_storage_backends, results: :results, status: :status, succeeded_count: :succeeded_count, target_dir: :target_dir, total_elapsed_ms: :total_elapsed_ms, total_file_count: :total_file_count, total_size_bytes: :total_size_bytes, verify: :verify, workload_count: :workload_count }.freeze
Instance Attribute Summary collapse
-
#all_cache_hits ⇒ Object
Returns the value of attribute all_cache_hits.
-
#continue_on_error ⇒ Object
Returns the value of attribute continue_on_error.
-
#failed_count ⇒ Object
Returns the value of attribute failed_count.
-
#object_storage_backends ⇒ Object
Returns the value of attribute object_storage_backends.
-
#results ⇒ Object
Returns the value of attribute results.
-
#status ⇒ Object
Returns the value of attribute status.
-
#succeeded_count ⇒ Object
Returns the value of attribute succeeded_count.
-
#target_dir ⇒ Object
Returns the value of attribute target_dir.
-
#total_elapsed_ms ⇒ Object
Returns the value of attribute total_elapsed_ms.
-
#total_file_count ⇒ Object
Returns the value of attribute total_file_count.
-
#total_size_bytes ⇒ Object
Returns the value of attribute total_size_bytes.
-
#verify ⇒ Object
Returns the value of attribute verify.
-
#workload_count ⇒ Object
Returns the value of attribute workload_count.
Instance Method Summary collapse
-
#initialize(json) ⇒ CacheWarmData
constructor
A new instance of CacheWarmData.
Constructor Details
#initialize(json) ⇒ CacheWarmData
Returns a new instance of CacheWarmData.
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/rafflesia/cache/cache_warm_data.rb', line 39 def initialize(json) super() hash = self.class.normalize(json) @all_cache_hits = hash[:all_cache_hits] @continue_on_error = hash[:continue_on_error] @failed_count = hash[:failed_count] @object_storage_backends = (hash[:object_storage_backends] || []) @results = (hash[:results] || []).map { |item| item ? Rafflesia::CacheWarmWorkloadResult.new(item) : nil } @status = hash[:status] @succeeded_count = hash[:succeeded_count] @target_dir = hash[:target_dir] @total_elapsed_ms = hash[:total_elapsed_ms] @total_file_count = hash[:total_file_count] @total_size_bytes = hash[:total_size_bytes] @verify = hash[:verify] @workload_count = hash[:workload_count] end |
Instance Attribute Details
#all_cache_hits ⇒ Object
Returns the value of attribute all_cache_hits.
24 25 26 |
# File 'lib/rafflesia/cache/cache_warm_data.rb', line 24 def all_cache_hits @all_cache_hits end |
#continue_on_error ⇒ Object
Returns the value of attribute continue_on_error.
24 25 26 |
# File 'lib/rafflesia/cache/cache_warm_data.rb', line 24 def continue_on_error @continue_on_error end |
#failed_count ⇒ Object
Returns the value of attribute failed_count.
24 25 26 |
# File 'lib/rafflesia/cache/cache_warm_data.rb', line 24 def failed_count @failed_count end |
#object_storage_backends ⇒ Object
Returns the value of attribute object_storage_backends.
24 25 26 |
# File 'lib/rafflesia/cache/cache_warm_data.rb', line 24 def object_storage_backends @object_storage_backends end |
#results ⇒ Object
Returns the value of attribute results.
24 25 26 |
# File 'lib/rafflesia/cache/cache_warm_data.rb', line 24 def results @results end |
#status ⇒ Object
Returns the value of attribute status.
24 25 26 |
# File 'lib/rafflesia/cache/cache_warm_data.rb', line 24 def status @status end |
#succeeded_count ⇒ Object
Returns the value of attribute succeeded_count.
24 25 26 |
# File 'lib/rafflesia/cache/cache_warm_data.rb', line 24 def succeeded_count @succeeded_count end |
#target_dir ⇒ Object
Returns the value of attribute target_dir.
24 25 26 |
# File 'lib/rafflesia/cache/cache_warm_data.rb', line 24 def target_dir @target_dir end |
#total_elapsed_ms ⇒ Object
Returns the value of attribute total_elapsed_ms.
24 25 26 |
# File 'lib/rafflesia/cache/cache_warm_data.rb', line 24 def total_elapsed_ms @total_elapsed_ms end |
#total_file_count ⇒ Object
Returns the value of attribute total_file_count.
24 25 26 |
# File 'lib/rafflesia/cache/cache_warm_data.rb', line 24 def total_file_count @total_file_count end |
#total_size_bytes ⇒ Object
Returns the value of attribute total_size_bytes.
24 25 26 |
# File 'lib/rafflesia/cache/cache_warm_data.rb', line 24 def total_size_bytes @total_size_bytes end |
#verify ⇒ Object
Returns the value of attribute verify.
24 25 26 |
# File 'lib/rafflesia/cache/cache_warm_data.rb', line 24 def verify @verify end |
#workload_count ⇒ Object
Returns the value of attribute workload_count.
24 25 26 |
# File 'lib/rafflesia/cache/cache_warm_data.rb', line 24 def workload_count @workload_count end |