Class: Rafflesia::SearchSegmentPrefetchData
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::SearchSegmentPrefetchData
- Defined in:
- lib/rafflesia/sequences/search_segment_prefetch_data.rb
Constant Summary collapse
- HASH_ATTRS =
{ block_cache_hits: :block_cache_hits, block_cache_misses: :block_cache_misses, budget: :budget, materialized_bytes: :materialized_bytes, object_bytes_fetched: :object_bytes_fetched, object_read_count: :object_read_count, plan: :plan, prefetched_object_ids: :prefetched_object_ids, query_key: :query_key, read_warnings: :read_warnings, segment_id: :segment_id, selected_block_count: :selected_block_count }.freeze
Instance Attribute Summary collapse
-
#block_cache_hits ⇒ Object
Returns the value of attribute block_cache_hits.
-
#block_cache_misses ⇒ Object
Returns the value of attribute block_cache_misses.
-
#budget ⇒ Object
Returns the value of attribute budget.
-
#materialized_bytes ⇒ Object
Returns the value of attribute materialized_bytes.
-
#object_bytes_fetched ⇒ Object
Returns the value of attribute object_bytes_fetched.
-
#object_read_count ⇒ Object
Returns the value of attribute object_read_count.
-
#plan ⇒ Object
Returns the value of attribute plan.
-
#prefetched_object_ids ⇒ Object
Returns the value of attribute prefetched_object_ids.
-
#query_key ⇒ Object
Returns the value of attribute query_key.
-
#read_warnings ⇒ Object
Returns the value of attribute read_warnings.
-
#segment_id ⇒ Object
Returns the value of attribute segment_id.
-
#selected_block_count ⇒ Object
Returns the value of attribute selected_block_count.
Instance Method Summary collapse
-
#initialize(json) ⇒ SearchSegmentPrefetchData
constructor
A new instance of SearchSegmentPrefetchData.
Constructor Details
#initialize(json) ⇒ SearchSegmentPrefetchData
Returns a new instance of SearchSegmentPrefetchData.
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/rafflesia/sequences/search_segment_prefetch_data.rb', line 37 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 @materialized_bytes = hash[:materialized_bytes] @object_bytes_fetched = hash[:object_bytes_fetched] @object_read_count = hash[:object_read_count] @plan = hash[:plan] ? Rafflesia::SearchSegmentPlanData.new(hash[:plan]) : nil @prefetched_object_ids = (hash[:prefetched_object_ids] || []) @query_key = hash[:query_key] @read_warnings = (hash[:read_warnings] || []).map { |item| item ? Rafflesia::SearchWarning.new(item) : nil } @segment_id = hash[:segment_id] @selected_block_count = hash[:selected_block_count] end |
Instance Attribute Details
#block_cache_hits ⇒ Object
Returns the value of attribute block_cache_hits.
23 24 25 |
# File 'lib/rafflesia/sequences/search_segment_prefetch_data.rb', line 23 def block_cache_hits @block_cache_hits end |
#block_cache_misses ⇒ Object
Returns the value of attribute block_cache_misses.
23 24 25 |
# File 'lib/rafflesia/sequences/search_segment_prefetch_data.rb', line 23 def block_cache_misses @block_cache_misses end |
#budget ⇒ Object
Returns the value of attribute budget.
23 24 25 |
# File 'lib/rafflesia/sequences/search_segment_prefetch_data.rb', line 23 def budget @budget end |
#materialized_bytes ⇒ Object
Returns the value of attribute materialized_bytes.
23 24 25 |
# File 'lib/rafflesia/sequences/search_segment_prefetch_data.rb', line 23 def materialized_bytes @materialized_bytes end |
#object_bytes_fetched ⇒ Object
Returns the value of attribute object_bytes_fetched.
23 24 25 |
# File 'lib/rafflesia/sequences/search_segment_prefetch_data.rb', line 23 def object_bytes_fetched @object_bytes_fetched end |
#object_read_count ⇒ Object
Returns the value of attribute object_read_count.
23 24 25 |
# File 'lib/rafflesia/sequences/search_segment_prefetch_data.rb', line 23 def object_read_count @object_read_count end |
#plan ⇒ Object
Returns the value of attribute plan.
23 24 25 |
# File 'lib/rafflesia/sequences/search_segment_prefetch_data.rb', line 23 def plan @plan end |
#prefetched_object_ids ⇒ Object
Returns the value of attribute prefetched_object_ids.
23 24 25 |
# File 'lib/rafflesia/sequences/search_segment_prefetch_data.rb', line 23 def prefetched_object_ids @prefetched_object_ids end |
#query_key ⇒ Object
Returns the value of attribute query_key.
23 24 25 |
# File 'lib/rafflesia/sequences/search_segment_prefetch_data.rb', line 23 def query_key @query_key end |
#read_warnings ⇒ Object
Returns the value of attribute read_warnings.
23 24 25 |
# File 'lib/rafflesia/sequences/search_segment_prefetch_data.rb', line 23 def read_warnings @read_warnings end |
#segment_id ⇒ Object
Returns the value of attribute segment_id.
23 24 25 |
# File 'lib/rafflesia/sequences/search_segment_prefetch_data.rb', line 23 def segment_id @segment_id end |
#selected_block_count ⇒ Object
Returns the value of attribute selected_block_count.
23 24 25 |
# File 'lib/rafflesia/sequences/search_segment_prefetch_data.rb', line 23 def selected_block_count @selected_block_count end |