Class: AWS::Flow::HistoryHelper

Inherits:
Object
  • Object
show all
Defined in:
lib/aws/decider/history_helper.rb

Instance Method Summary collapse

Constructor Details

#initialize(decision_task_iterator) ⇒ HistoryHelper

Returns a new instance of HistoryHelper.



21
22
23
24
# File 'lib/aws/decider/history_helper.rb', line 21

def initialize(decision_task_iterator)
  # TODO make sure we page through correctly
  @single_decision_events_iterator = SingleDecisionIterator.new(decision_task_iterator)
end

Instance Method Details

#get_decision_taskObject



41
42
43
# File 'lib/aws/decider/history_helper.rb', line 41

def get_decision_task
  @single_decision_events_iterator.get_decision_task
end

#get_last_non_replay_event_idObject



36
37
38
39
# File 'lib/aws/decider/history_helper.rb', line 36

def get_last_non_replay_event_id
  result = get_decision_task.previous_started_event_id
  result ||= 0
end

#get_replay_current_time_millisObject



31
32
33
34
# File 'lib/aws/decider/history_helper.rb', line 31

def get_replay_current_time_millis
  raise IllegalStateException if @current_decision_data.nil?
  @current_decision_data.replay_current_time_milliseconds
end

#get_single_decision_eventsObject



26
27
28
29
# File 'lib/aws/decider/history_helper.rb', line 26

def get_single_decision_events
  @current_decision_data = @single_decision_events_iterator.next
  return @current_decision_data.decision_events
end