Class: AWS::Flow::HistoryHelper
- Inherits:
-
Object
- Object
- AWS::Flow::HistoryHelper
- Defined in:
- lib/aws/decider/history_helper.rb
Instance Method Summary collapse
- #get_decision_task ⇒ Object
- #get_last_non_replay_event_id ⇒ Object
- #get_replay_current_time_millis ⇒ Object
- #get_single_decision_events ⇒ Object
-
#initialize(decision_task_iterator) ⇒ HistoryHelper
constructor
A new instance of HistoryHelper.
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_task ⇒ Object
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_id ⇒ Object
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_millis ⇒ Object
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_events ⇒ Object
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 |