Class: Rafflesia::FoldIndexMaterializeData
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::FoldIndexMaterializeData
- Defined in:
- lib/rafflesia/proteins/fold_index_materialize_data.rb
Constant Summary collapse
- HASH_ATTRS =
{ all_cache_hits: :all_cache_hits, file_count: :file_count, manifest_id: :manifest_id, manifest_path: :manifest_path, metrics: :metrics, ref: :ref, routing: :routing, segment_roles: :segment_roles, shard_count: :shard_count, shards: :shards, target_dir: :target_dir, total_size_bytes: :total_size_bytes, verified: :verified }.freeze
Instance Attribute Summary collapse
-
#all_cache_hits ⇒ Object
Returns the value of attribute all_cache_hits.
-
#file_count ⇒ Object
Returns the value of attribute file_count.
-
#manifest_id ⇒ Object
Returns the value of attribute manifest_id.
-
#manifest_path ⇒ Object
Returns the value of attribute manifest_path.
-
#metrics ⇒ Object
Returns the value of attribute metrics.
-
#ref ⇒ Object
Returns the value of attribute ref.
-
#routing ⇒ Object
Returns the value of attribute routing.
-
#segment_roles ⇒ Object
Returns the value of attribute segment_roles.
-
#shard_count ⇒ Object
Returns the value of attribute shard_count.
-
#shards ⇒ Object
Returns the value of attribute shards.
-
#target_dir ⇒ Object
Returns the value of attribute target_dir.
-
#total_size_bytes ⇒ Object
Returns the value of attribute total_size_bytes.
-
#verified ⇒ Object
Returns the value of attribute verified.
Instance Method Summary collapse
-
#initialize(json) ⇒ FoldIndexMaterializeData
constructor
A new instance of FoldIndexMaterializeData.
Constructor Details
#initialize(json) ⇒ FoldIndexMaterializeData
Returns a new instance of FoldIndexMaterializeData.
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/rafflesia/proteins/fold_index_materialize_data.rb', line 39 def initialize(json) super() hash = self.class.normalize(json) @all_cache_hits = hash[:all_cache_hits] @file_count = hash[:file_count] @manifest_id = hash[:manifest_id] @manifest_path = hash[:manifest_path] @metrics = hash[:metrics] ? Rafflesia::CacheMaterializationMetrics.new(hash[:metrics]) : nil @ref = hash[:ref] @routing = hash[:routing] ? Rafflesia::FoldIndexMaterializedSegment.new(hash[:routing]) : nil @segment_roles = (hash[:segment_roles] || []) @shard_count = hash[:shard_count] @shards = (hash[:shards] || []).map { |item| item ? Rafflesia::FoldIndexMaterializedShard.new(item) : nil } @target_dir = hash[:target_dir] @total_size_bytes = hash[:total_size_bytes] @verified = hash[:verified] end |
Instance Attribute Details
#all_cache_hits ⇒ Object
Returns the value of attribute all_cache_hits.
24 25 26 |
# File 'lib/rafflesia/proteins/fold_index_materialize_data.rb', line 24 def all_cache_hits @all_cache_hits end |
#file_count ⇒ Object
Returns the value of attribute file_count.
24 25 26 |
# File 'lib/rafflesia/proteins/fold_index_materialize_data.rb', line 24 def file_count @file_count end |
#manifest_id ⇒ Object
Returns the value of attribute manifest_id.
24 25 26 |
# File 'lib/rafflesia/proteins/fold_index_materialize_data.rb', line 24 def manifest_id @manifest_id end |
#manifest_path ⇒ Object
Returns the value of attribute manifest_path.
24 25 26 |
# File 'lib/rafflesia/proteins/fold_index_materialize_data.rb', line 24 def manifest_path @manifest_path end |
#metrics ⇒ Object
Returns the value of attribute metrics.
24 25 26 |
# File 'lib/rafflesia/proteins/fold_index_materialize_data.rb', line 24 def metrics @metrics end |
#ref ⇒ Object
Returns the value of attribute ref.
24 25 26 |
# File 'lib/rafflesia/proteins/fold_index_materialize_data.rb', line 24 def ref @ref end |
#routing ⇒ Object
Returns the value of attribute routing.
24 25 26 |
# File 'lib/rafflesia/proteins/fold_index_materialize_data.rb', line 24 def routing @routing end |
#segment_roles ⇒ Object
Returns the value of attribute segment_roles.
24 25 26 |
# File 'lib/rafflesia/proteins/fold_index_materialize_data.rb', line 24 def segment_roles @segment_roles end |
#shard_count ⇒ Object
Returns the value of attribute shard_count.
24 25 26 |
# File 'lib/rafflesia/proteins/fold_index_materialize_data.rb', line 24 def shard_count @shard_count end |
#shards ⇒ Object
Returns the value of attribute shards.
24 25 26 |
# File 'lib/rafflesia/proteins/fold_index_materialize_data.rb', line 24 def shards @shards end |
#target_dir ⇒ Object
Returns the value of attribute target_dir.
24 25 26 |
# File 'lib/rafflesia/proteins/fold_index_materialize_data.rb', line 24 def target_dir @target_dir end |
#total_size_bytes ⇒ Object
Returns the value of attribute total_size_bytes.
24 25 26 |
# File 'lib/rafflesia/proteins/fold_index_materialize_data.rb', line 24 def total_size_bytes @total_size_bytes end |
#verified ⇒ Object
Returns the value of attribute verified.
24 25 26 |
# File 'lib/rafflesia/proteins/fold_index_materialize_data.rb', line 24 def verified @verified end |