Class: Rafflesia::CacheNamespaceUsage
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::CacheNamespaceUsage
- Defined in:
- lib/rafflesia/cache/cache_namespace_usage.rb
Constant Summary collapse
- HASH_ATTRS =
{ active_lease_count: :active_lease_count, active_lease_pinned_count: :active_lease_pinned_count, eligible_size_bytes: :eligible_size_bytes, file_count: :file_count, namespace: :namespace, pinned_size_bytes: :pinned_size_bytes, target_dir: :target_dir, total_size_bytes: :total_size_bytes }.freeze
Instance Attribute Summary collapse
-
#active_lease_count ⇒ Object
Returns the value of attribute active_lease_count.
-
#active_lease_pinned_count ⇒ Object
Returns the value of attribute active_lease_pinned_count.
-
#eligible_size_bytes ⇒ Object
Returns the value of attribute eligible_size_bytes.
-
#file_count ⇒ Object
Returns the value of attribute file_count.
-
#namespace ⇒ Object
Returns the value of attribute namespace.
-
#pinned_size_bytes ⇒ Object
Returns the value of attribute pinned_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) ⇒ CacheNamespaceUsage
constructor
A new instance of CacheNamespaceUsage.
Constructor Details
#initialize(json) ⇒ CacheNamespaceUsage
Returns a new instance of CacheNamespaceUsage.
29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/rafflesia/cache/cache_namespace_usage.rb', line 29 def initialize(json) super() hash = self.class.normalize(json) @active_lease_count = hash[:active_lease_count] @active_lease_pinned_count = hash[:active_lease_pinned_count] @eligible_size_bytes = hash[:eligible_size_bytes] @file_count = hash[:file_count] @namespace = hash[:namespace] @pinned_size_bytes = hash[:pinned_size_bytes] @target_dir = hash[:target_dir] @total_size_bytes = hash[:total_size_bytes] end |
Instance Attribute Details
#active_lease_count ⇒ Object
Returns the value of attribute active_lease_count.
19 20 21 |
# File 'lib/rafflesia/cache/cache_namespace_usage.rb', line 19 def active_lease_count @active_lease_count end |
#active_lease_pinned_count ⇒ Object
Returns the value of attribute active_lease_pinned_count.
19 20 21 |
# File 'lib/rafflesia/cache/cache_namespace_usage.rb', line 19 def active_lease_pinned_count @active_lease_pinned_count end |
#eligible_size_bytes ⇒ Object
Returns the value of attribute eligible_size_bytes.
19 20 21 |
# File 'lib/rafflesia/cache/cache_namespace_usage.rb', line 19 def eligible_size_bytes @eligible_size_bytes end |
#file_count ⇒ Object
Returns the value of attribute file_count.
19 20 21 |
# File 'lib/rafflesia/cache/cache_namespace_usage.rb', line 19 def file_count @file_count end |
#namespace ⇒ Object
Returns the value of attribute namespace.
19 20 21 |
# File 'lib/rafflesia/cache/cache_namespace_usage.rb', line 19 def namespace @namespace end |
#pinned_size_bytes ⇒ Object
Returns the value of attribute pinned_size_bytes.
19 20 21 |
# File 'lib/rafflesia/cache/cache_namespace_usage.rb', line 19 def pinned_size_bytes @pinned_size_bytes end |
#target_dir ⇒ Object
Returns the value of attribute target_dir.
19 20 21 |
# File 'lib/rafflesia/cache/cache_namespace_usage.rb', line 19 def target_dir @target_dir end |
#total_size_bytes ⇒ Object
Returns the value of attribute total_size_bytes.
19 20 21 |
# File 'lib/rafflesia/cache/cache_namespace_usage.rb', line 19 def total_size_bytes @total_size_bytes end |