Class: Stoplight::Wiring::StorageSetBuilder Private
- Inherits:
-
Object
- Object
- Stoplight::Wiring::StorageSetBuilder
- Defined in:
- lib/stoplight/wiring/storage_set_builder.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Assembles a StorageSet from a backend, selecting windowed or unbounded metrics.
StorageSetBuilder is the single point where the windowed/unbounded decision is made. All other storage components (state, recovery lock, recovery metrics) are backend-specific but mode-independent.
Instance Attribute Summary collapse
- #backend ⇒ Object readonly private
- #windowed ⇒ Object readonly private
Instance Method Summary collapse
- #build ⇒ Object private
-
#initialize(backend:, windowed:) ⇒ StorageSetBuilder
constructor
private
A new instance of StorageSetBuilder.
Constructor Details
#initialize(backend:, windowed:) ⇒ StorageSetBuilder
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of StorageSetBuilder.
28 29 30 31 |
# File 'lib/stoplight/wiring/storage_set_builder.rb', line 28 def initialize(backend:, windowed:) @backend = backend @windowed = windowed end |
Instance Attribute Details
#backend ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
25 26 27 |
# File 'lib/stoplight/wiring/storage_set_builder.rb', line 25 def backend @backend end |
#windowed ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
26 27 28 |
# File 'lib/stoplight/wiring/storage_set_builder.rb', line 26 def windowed @windowed end |
Instance Method Details
#build ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
33 34 35 36 37 38 39 40 |
# File 'lib/stoplight/wiring/storage_set_builder.rb', line 33 def build StorageSet.new( metrics_store:, recovery_metrics_store: backend.recovery_metrics_store, state_store: backend.state_store, recovery_lock_store: backend.recovery_lock_store ) end |