Class: Rafflesia::FoldIndexEvictData
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::FoldIndexEvictData
- Defined in:
- lib/rafflesia/proteins/fold_index_evict_data.rb
Constant Summary collapse
- HASH_ATTRS =
{ dry_run: :dry_run, manifest_id: :manifest_id, manifest_path: :manifest_path, max_bytes: :max_bytes, policy: :policy, ref: :ref, remaining_size_bytes: :remaining_size_bytes, removed_count: :removed_count, removed_paths: :removed_paths, segment_roles: :segment_roles, selected_size_bytes: :selected_size_bytes, target_dir: :target_dir, total_size_bytes: :total_size_bytes }.freeze
Instance Attribute Summary collapse
-
#dry_run ⇒ Object
Returns the value of attribute dry_run.
-
#manifest_id ⇒ Object
Returns the value of attribute manifest_id.
-
#manifest_path ⇒ Object
Returns the value of attribute manifest_path.
-
#max_bytes ⇒ Object
Returns the value of attribute max_bytes.
-
#policy ⇒ Object
Returns the value of attribute policy.
-
#ref ⇒ Object
Returns the value of attribute ref.
-
#remaining_size_bytes ⇒ Object
Returns the value of attribute remaining_size_bytes.
-
#removed_count ⇒ Object
Returns the value of attribute removed_count.
-
#removed_paths ⇒ Object
Returns the value of attribute removed_paths.
-
#segment_roles ⇒ Object
Returns the value of attribute segment_roles.
-
#selected_size_bytes ⇒ Object
Returns the value of attribute selected_size_bytes.
-
#target_dir ⇒ Object
Returns the value of attribute target_dir.
-
#total_size_bytes ⇒ Object
Returns the value of attribute total_size_bytes.
Instance Method Summary collapse
-
#initialize(json) ⇒ FoldIndexEvictData
constructor
A new instance of FoldIndexEvictData.
Constructor Details
#initialize(json) ⇒ FoldIndexEvictData
Returns a new instance of FoldIndexEvictData.
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/rafflesia/proteins/fold_index_evict_data.rb', line 39 def initialize(json) super() hash = self.class.normalize(json) @dry_run = hash[:dry_run] @manifest_id = hash[:manifest_id] @manifest_path = hash[:manifest_path] @max_bytes = hash[:max_bytes] @policy = hash[:policy] ? Rafflesia::CacheEvictionPolicy.new(hash[:policy]) : nil @ref = hash[:ref] @remaining_size_bytes = hash[:remaining_size_bytes] @removed_count = hash[:removed_count] @removed_paths = (hash[:removed_paths] || []) @segment_roles = (hash[:segment_roles] || []) @selected_size_bytes = hash[:selected_size_bytes] @target_dir = hash[:target_dir] @total_size_bytes = hash[:total_size_bytes] end |
Instance Attribute Details
#dry_run ⇒ Object
Returns the value of attribute dry_run.
24 25 26 |
# File 'lib/rafflesia/proteins/fold_index_evict_data.rb', line 24 def dry_run @dry_run end |
#manifest_id ⇒ Object
Returns the value of attribute manifest_id.
24 25 26 |
# File 'lib/rafflesia/proteins/fold_index_evict_data.rb', line 24 def manifest_id @manifest_id end |
#manifest_path ⇒ Object
Returns the value of attribute manifest_path.
24 25 26 |
# File 'lib/rafflesia/proteins/fold_index_evict_data.rb', line 24 def manifest_path @manifest_path end |
#max_bytes ⇒ Object
Returns the value of attribute max_bytes.
24 25 26 |
# File 'lib/rafflesia/proteins/fold_index_evict_data.rb', line 24 def max_bytes @max_bytes end |
#policy ⇒ Object
Returns the value of attribute policy.
24 25 26 |
# File 'lib/rafflesia/proteins/fold_index_evict_data.rb', line 24 def policy @policy end |
#ref ⇒ Object
Returns the value of attribute ref.
24 25 26 |
# File 'lib/rafflesia/proteins/fold_index_evict_data.rb', line 24 def ref @ref end |
#remaining_size_bytes ⇒ Object
Returns the value of attribute remaining_size_bytes.
24 25 26 |
# File 'lib/rafflesia/proteins/fold_index_evict_data.rb', line 24 def remaining_size_bytes @remaining_size_bytes end |
#removed_count ⇒ Object
Returns the value of attribute removed_count.
24 25 26 |
# File 'lib/rafflesia/proteins/fold_index_evict_data.rb', line 24 def removed_count @removed_count end |
#removed_paths ⇒ Object
Returns the value of attribute removed_paths.
24 25 26 |
# File 'lib/rafflesia/proteins/fold_index_evict_data.rb', line 24 def removed_paths @removed_paths end |
#segment_roles ⇒ Object
Returns the value of attribute segment_roles.
24 25 26 |
# File 'lib/rafflesia/proteins/fold_index_evict_data.rb', line 24 def segment_roles @segment_roles end |
#selected_size_bytes ⇒ Object
Returns the value of attribute selected_size_bytes.
24 25 26 |
# File 'lib/rafflesia/proteins/fold_index_evict_data.rb', line 24 def selected_size_bytes @selected_size_bytes end |
#target_dir ⇒ Object
Returns the value of attribute target_dir.
24 25 26 |
# File 'lib/rafflesia/proteins/fold_index_evict_data.rb', line 24 def target_dir @target_dir end |
#total_size_bytes ⇒ Object
Returns the value of attribute total_size_bytes.
24 25 26 |
# File 'lib/rafflesia/proteins/fold_index_evict_data.rb', line 24 def total_size_bytes @total_size_bytes end |