Class: Rafflesia::BlastPackPrefetchData

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/sequences/blast_pack_prefetch_data.rb

Constant Summary collapse

HASH_ATTRS =
{
  block_cache_hits: :block_cache_hits,
  block_cache_misses: :block_cache_misses,
  budget: :budget,
  manifest_object_id: :manifest_object_id,
  materialized_bytes: :materialized_bytes,
  object_bytes_fetched: :object_bytes_fetched,
  object_read_count: :object_read_count,
  payload_selection: :payload_selection,
  prefetched_object_ids: :prefetched_object_ids,
  reads: :reads,
  segment_id: :segment_id,
  selected_block_count: :selected_block_count,
  sequence_bytes_planned: :sequence_bytes_planned,
  warnings: :warnings
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ BlastPackPrefetchData

Returns a new instance of BlastPackPrefetchData.



41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# File 'lib/rafflesia/sequences/blast_pack_prefetch_data.rb', line 41

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @block_cache_hits = hash[:block_cache_hits]
  @block_cache_misses = hash[:block_cache_misses]
  @budget = hash[:budget] ? Rafflesia::SearchPhysicalPlanBudget.new(hash[:budget]) : nil
  @manifest_object_id = hash[:manifest_object_id]
  @materialized_bytes = hash[:materialized_bytes]
  @object_bytes_fetched = hash[:object_bytes_fetched]
  @object_read_count = hash[:object_read_count]
  @payload_selection = hash[:payload_selection]
  @prefetched_object_ids = (hash[:prefetched_object_ids] || [])
  @reads = (hash[:reads] || []).map { |item| item ? Rafflesia::SearchSegmentObjectReadPlan.new(item) : nil }
  @segment_id = hash[:segment_id]
  @selected_block_count = hash[:selected_block_count]
  @sequence_bytes_planned = hash[:sequence_bytes_planned]
  @warnings = (hash[:warnings] || []).map { |item| item ? Rafflesia::SearchWarning.new(item) : nil }
end

Instance Attribute Details

#block_cache_hitsObject

Returns the value of attribute block_cache_hits.



25
26
27
# File 'lib/rafflesia/sequences/blast_pack_prefetch_data.rb', line 25

def block_cache_hits
  @block_cache_hits
end

#block_cache_missesObject

Returns the value of attribute block_cache_misses.



25
26
27
# File 'lib/rafflesia/sequences/blast_pack_prefetch_data.rb', line 25

def block_cache_misses
  @block_cache_misses
end

#budgetObject

Returns the value of attribute budget.



25
26
27
# File 'lib/rafflesia/sequences/blast_pack_prefetch_data.rb', line 25

def budget
  @budget
end

#manifest_object_idObject

Returns the value of attribute manifest_object_id.



25
26
27
# File 'lib/rafflesia/sequences/blast_pack_prefetch_data.rb', line 25

def manifest_object_id
  @manifest_object_id
end

#materialized_bytesObject

Returns the value of attribute materialized_bytes.



25
26
27
# File 'lib/rafflesia/sequences/blast_pack_prefetch_data.rb', line 25

def materialized_bytes
  @materialized_bytes
end

#object_bytes_fetchedObject

Returns the value of attribute object_bytes_fetched.



25
26
27
# File 'lib/rafflesia/sequences/blast_pack_prefetch_data.rb', line 25

def object_bytes_fetched
  @object_bytes_fetched
end

#object_read_countObject

Returns the value of attribute object_read_count.



25
26
27
# File 'lib/rafflesia/sequences/blast_pack_prefetch_data.rb', line 25

def object_read_count
  @object_read_count
end

#payload_selectionObject

Returns the value of attribute payload_selection.



25
26
27
# File 'lib/rafflesia/sequences/blast_pack_prefetch_data.rb', line 25

def payload_selection
  @payload_selection
end

#prefetched_object_idsObject

Returns the value of attribute prefetched_object_ids.



25
26
27
# File 'lib/rafflesia/sequences/blast_pack_prefetch_data.rb', line 25

def prefetched_object_ids
  @prefetched_object_ids
end

#readsObject

Returns the value of attribute reads.



25
26
27
# File 'lib/rafflesia/sequences/blast_pack_prefetch_data.rb', line 25

def reads
  @reads
end

#segment_idObject

Returns the value of attribute segment_id.



25
26
27
# File 'lib/rafflesia/sequences/blast_pack_prefetch_data.rb', line 25

def segment_id
  @segment_id
end

#selected_block_countObject

Returns the value of attribute selected_block_count.



25
26
27
# File 'lib/rafflesia/sequences/blast_pack_prefetch_data.rb', line 25

def selected_block_count
  @selected_block_count
end

#sequence_bytes_plannedObject

Returns the value of attribute sequence_bytes_planned.



25
26
27
# File 'lib/rafflesia/sequences/blast_pack_prefetch_data.rb', line 25

def sequence_bytes_planned
  @sequence_bytes_planned
end

#warningsObject

Returns the value of attribute warnings.



25
26
27
# File 'lib/rafflesia/sequences/blast_pack_prefetch_data.rb', line 25

def warnings
  @warnings
end