Class: Rafflesia::BlastDbEvictData

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/sequences/blast_db_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,
  selected_size_bytes: :selected_size_bytes,
  target_dir: :target_dir,
  total_size_bytes: :total_size_bytes
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ BlastDbEvictData

Returns a new instance of BlastDbEvictData.



37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# File 'lib/rafflesia/sequences/blast_db_evict_data.rb', line 37

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] || [])
  @selected_size_bytes = hash[:selected_size_bytes]
  @target_dir = hash[:target_dir]
  @total_size_bytes = hash[:total_size_bytes]
end

Instance Attribute Details

#dry_runObject

Returns the value of attribute dry_run.



23
24
25
# File 'lib/rafflesia/sequences/blast_db_evict_data.rb', line 23

def dry_run
  @dry_run
end

#manifest_idObject

Returns the value of attribute manifest_id.



23
24
25
# File 'lib/rafflesia/sequences/blast_db_evict_data.rb', line 23

def manifest_id
  @manifest_id
end

#manifest_pathObject

Returns the value of attribute manifest_path.



23
24
25
# File 'lib/rafflesia/sequences/blast_db_evict_data.rb', line 23

def manifest_path
  @manifest_path
end

#max_bytesObject

Returns the value of attribute max_bytes.



23
24
25
# File 'lib/rafflesia/sequences/blast_db_evict_data.rb', line 23

def max_bytes
  @max_bytes
end

#policyObject

Returns the value of attribute policy.



23
24
25
# File 'lib/rafflesia/sequences/blast_db_evict_data.rb', line 23

def policy
  @policy
end

#refObject

Returns the value of attribute ref.



23
24
25
# File 'lib/rafflesia/sequences/blast_db_evict_data.rb', line 23

def ref
  @ref
end

#remaining_size_bytesObject

Returns the value of attribute remaining_size_bytes.



23
24
25
# File 'lib/rafflesia/sequences/blast_db_evict_data.rb', line 23

def remaining_size_bytes
  @remaining_size_bytes
end

#removed_countObject

Returns the value of attribute removed_count.



23
24
25
# File 'lib/rafflesia/sequences/blast_db_evict_data.rb', line 23

def removed_count
  @removed_count
end

#removed_pathsObject

Returns the value of attribute removed_paths.



23
24
25
# File 'lib/rafflesia/sequences/blast_db_evict_data.rb', line 23

def removed_paths
  @removed_paths
end

#selected_size_bytesObject

Returns the value of attribute selected_size_bytes.



23
24
25
# File 'lib/rafflesia/sequences/blast_db_evict_data.rb', line 23

def selected_size_bytes
  @selected_size_bytes
end

#target_dirObject

Returns the value of attribute target_dir.



23
24
25
# File 'lib/rafflesia/sequences/blast_db_evict_data.rb', line 23

def target_dir
  @target_dir
end

#total_size_bytesObject

Returns the value of attribute total_size_bytes.



23
24
25
# File 'lib/rafflesia/sequences/blast_db_evict_data.rb', line 23

def total_size_bytes
  @total_size_bytes
end