Class: ActiveRecord::Materialized::Configuration
- Inherits:
-
Object
- Object
- ActiveRecord::Materialized::Configuration
- Extended by:
- T::Sig
- Defined in:
- lib/activerecord/materialized/configuration.rb
Overview
Global, app-wide defaults, set via configure. Individual views can override most of these with the corresponding DSL macro.
Instance Attribute Summary collapse
-
#atomic_swap_refresh ⇒ Object
Returns the value of attribute atomic_swap_refresh.
-
#default_cold_read_strategy ⇒ Object
Returns the value of attribute default_cold_read_strategy.
-
#default_max_staleness ⇒ Object
Returns the value of attribute default_max_staleness.
-
#default_refresh_debounce ⇒ Object
Returns the value of attribute default_refresh_debounce.
-
#default_refresh_strategy ⇒ Object
Returns the value of attribute default_refresh_strategy.
- #max_tracked_partitions ⇒ Object
-
#metadata_table_name ⇒ Object
Returns the value of attribute metadata_table_name.
-
#partition_table_name ⇒ Object
Returns the value of attribute partition_table_name.
-
#refresh_dispatcher ⇒ Object
Returns the value of attribute refresh_dispatcher.
-
#refresh_queue_name ⇒ Object
Returns the value of attribute refresh_queue_name.
-
#refresh_timeout ⇒ Object
Returns the value of attribute refresh_timeout.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
66 67 68 69 70 71 72 73 74 75 76 77 |
# File 'lib/activerecord/materialized/configuration.rb', line 66 def initialize @metadata_table_name = T.let("ar_materialized_view_metadata", String) @partition_table_name = T.let("ar_materialized_view_partitions", String) @default_max_staleness = T.let(nil, T.nilable(DebounceInterval)) @refresh_timeout = T.let(nil, T.nilable(Integer)) @atomic_swap_refresh = T.let(true, T::Boolean) @default_refresh_strategy = T.let(:async, Symbol) @default_refresh_debounce = T.let(2, DebounceInterval) @refresh_dispatcher = T.let(:async, Symbol) @refresh_queue_name = T.let(:materialized_views, Symbol) @default_cold_read_strategy = T.let(:read_through, Symbol) end |
Instance Attribute Details
#atomic_swap_refresh ⇒ Object
Returns the value of attribute atomic_swap_refresh.
29 30 31 |
# File 'lib/activerecord/materialized/configuration.rb', line 29 def atomic_swap_refresh @atomic_swap_refresh end |
#default_cold_read_strategy ⇒ Object
Returns the value of attribute default_cold_read_strategy.
50 51 52 |
# File 'lib/activerecord/materialized/configuration.rb', line 50 def default_cold_read_strategy @default_cold_read_strategy end |
#default_max_staleness ⇒ Object
Returns the value of attribute default_max_staleness.
21 22 23 |
# File 'lib/activerecord/materialized/configuration.rb', line 21 def default_max_staleness @default_max_staleness end |
#default_refresh_debounce ⇒ Object
Returns the value of attribute default_refresh_debounce.
37 38 39 |
# File 'lib/activerecord/materialized/configuration.rb', line 37 def default_refresh_debounce @default_refresh_debounce end |
#default_refresh_strategy ⇒ Object
Returns the value of attribute default_refresh_strategy.
33 34 35 |
# File 'lib/activerecord/materialized/configuration.rb', line 33 def default_refresh_strategy @default_refresh_strategy end |
#max_tracked_partitions ⇒ Object
61 62 63 |
# File 'lib/activerecord/materialized/configuration.rb', line 61 def max_tracked_partitions @max_tracked_partitions ||= T.let(1_000, T.nilable(Integer)) end |
#metadata_table_name ⇒ Object
Returns the value of attribute metadata_table_name.
13 14 15 |
# File 'lib/activerecord/materialized/configuration.rb', line 13 def @metadata_table_name end |
#partition_table_name ⇒ Object
Returns the value of attribute partition_table_name.
17 18 19 |
# File 'lib/activerecord/materialized/configuration.rb', line 17 def partition_table_name @partition_table_name end |
#refresh_dispatcher ⇒ Object
Returns the value of attribute refresh_dispatcher.
41 42 43 |
# File 'lib/activerecord/materialized/configuration.rb', line 41 def refresh_dispatcher @refresh_dispatcher end |
#refresh_queue_name ⇒ Object
Returns the value of attribute refresh_queue_name.
45 46 47 |
# File 'lib/activerecord/materialized/configuration.rb', line 45 def refresh_queue_name @refresh_queue_name end |
#refresh_timeout ⇒ Object
Returns the value of attribute refresh_timeout.
25 26 27 |
# File 'lib/activerecord/materialized/configuration.rb', line 25 def refresh_timeout @refresh_timeout end |