Class: AWS::Flow::HistoryHelper

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

Instance Method Summary (collapse)

Constructor Details

- (HistoryHelper) initialize(decision_task_iterator)

Returns a new instance of HistoryHelper



21
22
23
24
# File 'aws-flow-ruby/aws-flow/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

- (Object) get_decision_task



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

def get_decision_task
  @single_decision_events_iterator.get_decision_task
end

- (Object) get_last_non_replay_event_id



36
37
38
39
# File 'aws-flow-ruby/aws-flow/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

- (Object) get_replay_current_time_millis

Raises:

  • (IllegalStateException)


31
32
33
34
# File 'aws-flow-ruby/aws-flow/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

- (Object) get_single_decision_events



26
27
28
29
# File 'aws-flow-ruby/aws-flow/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