Class: RubyEventStore::Outbox::Configuration
- Inherits:
-
Object
- Object
- RubyEventStore::Outbox::Configuration
- Defined in:
- lib/ruby_event_store/outbox/configuration.rb
Instance Attribute Summary collapse
-
#batch_size ⇒ Object
readonly
Returns the value of attribute batch_size.
-
#cleanup ⇒ Object
readonly
Returns the value of attribute cleanup.
-
#cleanup_limit ⇒ Object
readonly
Returns the value of attribute cleanup_limit.
-
#database_url ⇒ Object
readonly
Returns the value of attribute database_url.
-
#locking ⇒ Object
readonly
Returns the value of attribute locking.
-
#message_format ⇒ Object
readonly
Returns the value of attribute message_format.
-
#redis_url ⇒ Object
readonly
Returns the value of attribute redis_url.
-
#sleep_on_empty ⇒ Object
readonly
Returns the value of attribute sleep_on_empty.
-
#split_keys ⇒ Object
readonly
Returns the value of attribute split_keys.
Instance Method Summary collapse
-
#initialize(split_keys:, message_format:, batch_size:, database_url:, redis_url:, cleanup:, cleanup_limit:, sleep_on_empty:, locking:) ⇒ Configuration
constructor
A new instance of Configuration.
- #with(overriden_options) ⇒ Object
Constructor Details
#initialize(split_keys:, message_format:, batch_size:, database_url:, redis_url:, cleanup:, cleanup_limit:, sleep_on_empty:, locking:) ⇒ Configuration
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/ruby_event_store/outbox/configuration.rb', line 6 def initialize( split_keys:, message_format:, batch_size:, database_url:, redis_url:, cleanup:, cleanup_limit:, sleep_on_empty:, locking: ) @split_keys = split_keys = @batch_size = batch_size || 100 @database_url = database_url @redis_url = redis_url @cleanup = cleanup @cleanup_limit = cleanup_limit @sleep_on_empty = sleep_on_empty @locking = locking freeze end |
Instance Attribute Details
#batch_size ⇒ Object (readonly)
Returns the value of attribute batch_size.
43 44 45 |
# File 'lib/ruby_event_store/outbox/configuration.rb', line 43 def batch_size @batch_size end |
#cleanup ⇒ Object (readonly)
Returns the value of attribute cleanup.
43 44 45 |
# File 'lib/ruby_event_store/outbox/configuration.rb', line 43 def cleanup @cleanup end |
#cleanup_limit ⇒ Object (readonly)
Returns the value of attribute cleanup_limit.
43 44 45 |
# File 'lib/ruby_event_store/outbox/configuration.rb', line 43 def cleanup_limit @cleanup_limit end |
#database_url ⇒ Object (readonly)
Returns the value of attribute database_url.
43 44 45 |
# File 'lib/ruby_event_store/outbox/configuration.rb', line 43 def database_url @database_url end |
#locking ⇒ Object (readonly)
Returns the value of attribute locking.
43 44 45 |
# File 'lib/ruby_event_store/outbox/configuration.rb', line 43 def locking @locking end |
#message_format ⇒ Object (readonly)
Returns the value of attribute message_format.
43 44 45 |
# File 'lib/ruby_event_store/outbox/configuration.rb', line 43 def end |
#redis_url ⇒ Object (readonly)
Returns the value of attribute redis_url.
43 44 45 |
# File 'lib/ruby_event_store/outbox/configuration.rb', line 43 def redis_url @redis_url end |
#sleep_on_empty ⇒ Object (readonly)
Returns the value of attribute sleep_on_empty.
43 44 45 |
# File 'lib/ruby_event_store/outbox/configuration.rb', line 43 def sleep_on_empty @sleep_on_empty end |
#split_keys ⇒ Object (readonly)
Returns the value of attribute split_keys.
43 44 45 |
# File 'lib/ruby_event_store/outbox/configuration.rb', line 43 def split_keys @split_keys end |
Instance Method Details
#with(overriden_options) ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/ruby_event_store/outbox/configuration.rb', line 29 def with() self.class.new( split_keys: .fetch(:split_keys, split_keys), message_format: .fetch(:message_format, ), batch_size: .fetch(:batch_size, batch_size), database_url: .fetch(:database_url, database_url), redis_url: .fetch(:redis_url, redis_url), cleanup: .fetch(:cleanup, cleanup), cleanup_limit: .fetch(:cleanup_limit, cleanup_limit), sleep_on_empty: .fetch(:sleep_on_empty, sleep_on_empty), locking: .fetch(:locking, locking), ) end |