Class: RubyEventStore::Outbox::Tempo

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby_event_store/outbox/tempo.rb

Constant Summary collapse

EXPONENTIAL_MULTIPLIER =
2

Instance Method Summary collapse

Constructor Details

#initialize(max_batch_size) ⇒ Tempo

Returns a new instance of Tempo.

Raises:

  • (ArgumentError)


8
9
10
11
# File 'lib/ruby_event_store/outbox/tempo.rb', line 8

def initialize(max_batch_size)
  raise ArgumentError if max_batch_size < 1
  @max_batch_size = max_batch_size
end

Instance Method Details

#batch_sizeObject



13
14
15
# File 'lib/ruby_event_store/outbox/tempo.rb', line 13

def batch_size
  @batch_size = next_batch_size
end