class Upperkut::Strategies::Base
Public Instance Methods
Public: Confirms that items have been processed successfully.
items - The Array of items do be confirmed.
# File lib/upperkut/strategies/base.rb, line 30 def ack(_items) raise NotImplementedError end
Public: Clear all data related to the strategy.
# File lib/upperkut/strategies/base.rb, line 23 def clear raise NotImplementedError end
Public: Retrieve events from Strategy.
batch_size: # of items to be retrieved.
Returns an Array containing events as hash.
# File lib/upperkut/strategies/base.rb, line 18 def fetch_items(_batch_size) raise NotImplementedError end
Public: Consolidated strategy metrics.
Returns hash containing metric name and values.
# File lib/upperkut/strategies/base.rb, line 51 def metrics raise NotImplementedError end
Public: Informs that items have been not processed successfully and therefore must be re-processed.
items - The Array of items do be unacknowledged.
# File lib/upperkut/strategies/base.rb, line 37 def nack(_items) raise NotImplementedError end
Public: Tells when to execute the event processing, when this condition is met so the events are dispatched to the worker.
# File lib/upperkut/strategies/base.rb, line 44 def process? raise NotImplementedError end
Public: Ingests the event into strategy.
items - The Array of items do be inserted.
Returns true when success, raise when error.
# File lib/upperkut/strategies/base.rb, line 9 def push_items(_items = []) raise NotImplementedError end