Class: Rafflesia::CacheAdmissionRequest
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::CacheAdmissionRequest
- Defined in:
- lib/rafflesia/cache/cache_admission_request.rb
Constant Summary collapse
- HASH_ATTRS =
{ candidate_object_ids: :candidate_object_ids, candidate_ref: :candidate_ref, estimated_size_bytes: :estimated_size_bytes, expected_reuse_count: :expected_reuse_count, max_bytes: :max_bytes, namespace: :namespace, older_than_seconds: :older_than_seconds, pinned_paths: :pinned_paths, policy: :policy, priority: :priority, require_free_capacity: :require_free_capacity, target_dir: :target_dir, workload: :workload, workload_profile: :workload_profile }.freeze
Instance Attribute Summary collapse
-
#candidate_object_ids ⇒ Object
Returns the value of attribute candidate_object_ids.
-
#candidate_ref ⇒ Object
Returns the value of attribute candidate_ref.
-
#estimated_size_bytes ⇒ Object
Returns the value of attribute estimated_size_bytes.
-
#expected_reuse_count ⇒ Object
Returns the value of attribute expected_reuse_count.
-
#max_bytes ⇒ Object
Returns the value of attribute max_bytes.
-
#namespace ⇒ Object
Returns the value of attribute namespace.
-
#older_than_seconds ⇒ Object
Returns the value of attribute older_than_seconds.
-
#pinned_paths ⇒ Object
Returns the value of attribute pinned_paths.
-
#policy ⇒ Object
Returns the value of attribute policy.
-
#priority ⇒ Object
Returns the value of attribute priority.
-
#require_free_capacity ⇒ Object
Returns the value of attribute require_free_capacity.
-
#target_dir ⇒ Object
Returns the value of attribute target_dir.
-
#workload ⇒ Object
Returns the value of attribute workload.
-
#workload_profile ⇒ Object
Returns the value of attribute workload_profile.
Instance Method Summary collapse
-
#initialize(json) ⇒ CacheAdmissionRequest
constructor
A new instance of CacheAdmissionRequest.
Constructor Details
#initialize(json) ⇒ CacheAdmissionRequest
Returns a new instance of CacheAdmissionRequest.
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/rafflesia/cache/cache_admission_request.rb', line 41 def initialize(json) super() hash = self.class.normalize(json) @candidate_object_ids = (hash[:candidate_object_ids] || []) @candidate_ref = hash[:candidate_ref] @estimated_size_bytes = hash[:estimated_size_bytes] @expected_reuse_count = hash[:expected_reuse_count] @max_bytes = hash[:max_bytes] @namespace = hash[:namespace] @older_than_seconds = hash[:older_than_seconds] @pinned_paths = (hash[:pinned_paths] || []) @policy = hash[:policy] ? Rafflesia::CacheEvictionPolicy.new(hash[:policy]) : nil @priority = hash[:priority] @require_free_capacity = hash[:require_free_capacity] @target_dir = hash[:target_dir] @workload = hash[:workload] @workload_profile = hash[:workload_profile] end |
Instance Attribute Details
#candidate_object_ids ⇒ Object
Returns the value of attribute candidate_object_ids.
25 26 27 |
# File 'lib/rafflesia/cache/cache_admission_request.rb', line 25 def candidate_object_ids @candidate_object_ids end |
#candidate_ref ⇒ Object
Returns the value of attribute candidate_ref.
25 26 27 |
# File 'lib/rafflesia/cache/cache_admission_request.rb', line 25 def candidate_ref @candidate_ref end |
#estimated_size_bytes ⇒ Object
Returns the value of attribute estimated_size_bytes.
25 26 27 |
# File 'lib/rafflesia/cache/cache_admission_request.rb', line 25 def estimated_size_bytes @estimated_size_bytes end |
#expected_reuse_count ⇒ Object
Returns the value of attribute expected_reuse_count.
25 26 27 |
# File 'lib/rafflesia/cache/cache_admission_request.rb', line 25 def expected_reuse_count @expected_reuse_count end |
#max_bytes ⇒ Object
Returns the value of attribute max_bytes.
25 26 27 |
# File 'lib/rafflesia/cache/cache_admission_request.rb', line 25 def max_bytes @max_bytes end |
#namespace ⇒ Object
Returns the value of attribute namespace.
25 26 27 |
# File 'lib/rafflesia/cache/cache_admission_request.rb', line 25 def namespace @namespace end |
#older_than_seconds ⇒ Object
Returns the value of attribute older_than_seconds.
25 26 27 |
# File 'lib/rafflesia/cache/cache_admission_request.rb', line 25 def older_than_seconds @older_than_seconds end |
#pinned_paths ⇒ Object
Returns the value of attribute pinned_paths.
25 26 27 |
# File 'lib/rafflesia/cache/cache_admission_request.rb', line 25 def pinned_paths @pinned_paths end |
#policy ⇒ Object
Returns the value of attribute policy.
25 26 27 |
# File 'lib/rafflesia/cache/cache_admission_request.rb', line 25 def policy @policy end |
#priority ⇒ Object
Returns the value of attribute priority.
25 26 27 |
# File 'lib/rafflesia/cache/cache_admission_request.rb', line 25 def priority @priority end |
#require_free_capacity ⇒ Object
Returns the value of attribute require_free_capacity.
25 26 27 |
# File 'lib/rafflesia/cache/cache_admission_request.rb', line 25 def require_free_capacity @require_free_capacity end |
#target_dir ⇒ Object
Returns the value of attribute target_dir.
25 26 27 |
# File 'lib/rafflesia/cache/cache_admission_request.rb', line 25 def target_dir @target_dir end |
#workload ⇒ Object
Returns the value of attribute workload.
25 26 27 |
# File 'lib/rafflesia/cache/cache_admission_request.rb', line 25 def workload @workload end |
#workload_profile ⇒ Object
Returns the value of attribute workload_profile.
25 26 27 |
# File 'lib/rafflesia/cache/cache_admission_request.rb', line 25 def workload_profile @workload_profile end |