Class: Rafflesia::CacheStatusRequest

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/cache/cache_status_request.rb

Constant Summary collapse

HASH_ATTRS =
{
  include_files: :include_files,
  max_bytes: :max_bytes,
  max_files: :max_files,
  namespace: :namespace,
  older_than_seconds: :older_than_seconds,
  pinned_paths: :pinned_paths,
  policy: :policy,
  target_dir: :target_dir,
  workload_profile: :workload_profile
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ CacheStatusRequest

Returns a new instance of CacheStatusRequest.



31
32
33
34
35
36
37
38
39
40
41
42
43
# File 'lib/rafflesia/cache/cache_status_request.rb', line 31

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @include_files = hash[:include_files]
  @max_bytes = hash[:max_bytes]
  @max_files = hash[:max_files]
  @namespace = hash[:namespace]
  @older_than_seconds = hash[:older_than_seconds]
  @pinned_paths = (hash[:pinned_paths] || [])
  @policy = hash[:policy] ? Rafflesia::CacheEvictionPolicy.new(hash[:policy]) : nil
  @target_dir = hash[:target_dir]
  @workload_profile = hash[:workload_profile]
end

Instance Attribute Details

#include_filesObject

Returns the value of attribute include_files.



20
21
22
# File 'lib/rafflesia/cache/cache_status_request.rb', line 20

def include_files
  @include_files
end

#max_bytesObject

Returns the value of attribute max_bytes.



20
21
22
# File 'lib/rafflesia/cache/cache_status_request.rb', line 20

def max_bytes
  @max_bytes
end

#max_filesObject

Returns the value of attribute max_files.



20
21
22
# File 'lib/rafflesia/cache/cache_status_request.rb', line 20

def max_files
  @max_files
end

#namespaceObject

Returns the value of attribute namespace.



20
21
22
# File 'lib/rafflesia/cache/cache_status_request.rb', line 20

def namespace
  @namespace
end

#older_than_secondsObject

Returns the value of attribute older_than_seconds.



20
21
22
# File 'lib/rafflesia/cache/cache_status_request.rb', line 20

def older_than_seconds
  @older_than_seconds
end

#pinned_pathsObject

Returns the value of attribute pinned_paths.



20
21
22
# File 'lib/rafflesia/cache/cache_status_request.rb', line 20

def pinned_paths
  @pinned_paths
end

#policyObject

Returns the value of attribute policy.



20
21
22
# File 'lib/rafflesia/cache/cache_status_request.rb', line 20

def policy
  @policy
end

#target_dirObject

Returns the value of attribute target_dir.



20
21
22
# File 'lib/rafflesia/cache/cache_status_request.rb', line 20

def target_dir
  @target_dir
end

#workload_profileObject

Returns the value of attribute workload_profile.



20
21
22
# File 'lib/rafflesia/cache/cache_status_request.rb', line 20

def workload_profile
  @workload_profile
end