Class: Rafflesia::ObjectArtifactCacheContract

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/object_artifacts/object_artifact_cache_contract.rb

Constant Summary collapse

HASH_ATTRS =
{
  cold_cache_behavior: :cold_cache_behavior,
  concurrency_behavior: :concurrency_behavior,
  eviction_behavior: :eviction_behavior,
  local_cache_key: :local_cache_key,
  materialization_unit: :materialization_unit,
  metrics: :metrics,
  non_repairable_degradation: :non_repairable_degradation,
  recovery_behavior: :recovery_behavior,
  repairable_degradation: :repairable_degradation,
  verification_behavior: :verification_behavior,
  warm_cache_behavior: :warm_cache_behavior
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ ObjectArtifactCacheContract

Returns a new instance of ObjectArtifactCacheContract.



35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# File 'lib/rafflesia/object_artifacts/object_artifact_cache_contract.rb', line 35

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @cold_cache_behavior = hash[:cold_cache_behavior]
  @concurrency_behavior = hash[:concurrency_behavior]
  @eviction_behavior = hash[:eviction_behavior]
  @local_cache_key = (hash[:local_cache_key] || [])
  @materialization_unit = hash[:materialization_unit]
  @metrics = (hash[:metrics] || [])
  @non_repairable_degradation = (hash[:non_repairable_degradation] || [])
  @recovery_behavior = hash[:recovery_behavior]
  @repairable_degradation = (hash[:repairable_degradation] || [])
  @verification_behavior = hash[:verification_behavior]
  @warm_cache_behavior = hash[:warm_cache_behavior]
end

Instance Attribute Details

#cold_cache_behaviorObject

Returns the value of attribute cold_cache_behavior.



22
23
24
# File 'lib/rafflesia/object_artifacts/object_artifact_cache_contract.rb', line 22

def cold_cache_behavior
  @cold_cache_behavior
end

#concurrency_behaviorObject

Returns the value of attribute concurrency_behavior.



22
23
24
# File 'lib/rafflesia/object_artifacts/object_artifact_cache_contract.rb', line 22

def concurrency_behavior
  @concurrency_behavior
end

#eviction_behaviorObject

Returns the value of attribute eviction_behavior.



22
23
24
# File 'lib/rafflesia/object_artifacts/object_artifact_cache_contract.rb', line 22

def eviction_behavior
  @eviction_behavior
end

#local_cache_keyObject

Returns the value of attribute local_cache_key.



22
23
24
# File 'lib/rafflesia/object_artifacts/object_artifact_cache_contract.rb', line 22

def local_cache_key
  @local_cache_key
end

#materialization_unitObject

Returns the value of attribute materialization_unit.



22
23
24
# File 'lib/rafflesia/object_artifacts/object_artifact_cache_contract.rb', line 22

def materialization_unit
  @materialization_unit
end

#metricsObject

Returns the value of attribute metrics.



22
23
24
# File 'lib/rafflesia/object_artifacts/object_artifact_cache_contract.rb', line 22

def metrics
  @metrics
end

#non_repairable_degradationObject

Returns the value of attribute non_repairable_degradation.



22
23
24
# File 'lib/rafflesia/object_artifacts/object_artifact_cache_contract.rb', line 22

def non_repairable_degradation
  @non_repairable_degradation
end

#recovery_behaviorObject

Returns the value of attribute recovery_behavior.



22
23
24
# File 'lib/rafflesia/object_artifacts/object_artifact_cache_contract.rb', line 22

def recovery_behavior
  @recovery_behavior
end

#repairable_degradationObject

Returns the value of attribute repairable_degradation.



22
23
24
# File 'lib/rafflesia/object_artifacts/object_artifact_cache_contract.rb', line 22

def repairable_degradation
  @repairable_degradation
end

#verification_behaviorObject

Returns the value of attribute verification_behavior.



22
23
24
# File 'lib/rafflesia/object_artifacts/object_artifact_cache_contract.rb', line 22

def verification_behavior
  @verification_behavior
end

#warm_cache_behaviorObject

Returns the value of attribute warm_cache_behavior.



22
23
24
# File 'lib/rafflesia/object_artifacts/object_artifact_cache_contract.rb', line 22

def warm_cache_behavior
  @warm_cache_behavior
end