Search in sources :

Example 1 with TimerFiredEventAttributes

use of com.uber.cadence.TimerFiredEventAttributes in project cadence-client by uber-java.

the class ReplayDecider method handleTimerFired.

private void handleTimerFired(HistoryEvent event) {
    TimerFiredEventAttributes attributes = event.getTimerFiredEventAttributes();
    String timerId = attributes.getTimerId();
    if (timerId.equals(DecisionsHelper.FORCE_IMMEDIATE_DECISION_TIMER)) {
        return;
    }
    context.handleTimerFired(attributes);
}
Also used : TimerFiredEventAttributes(com.uber.cadence.TimerFiredEventAttributes)

Example 2 with TimerFiredEventAttributes

use of com.uber.cadence.TimerFiredEventAttributes in project cadence-client by uber-java.

the class StateMachines method fireTimer.

private static void fireTimer(RequestContext ctx, TimerData data, Object ignored, long notUsed) {
    TimerFiredEventAttributes a = new TimerFiredEventAttributes().setTimerId(data.startedEvent.getTimerId()).setStartedEventId(data.startedEventId);
    HistoryEvent event = new HistoryEvent().setEventType(EventType.TimerFired).setTimerFiredEventAttributes(a);
    ctx.addEvent(event);
}
Also used : TimerFiredEventAttributes(com.uber.cadence.TimerFiredEventAttributes) HistoryEvent(com.uber.cadence.HistoryEvent)

Aggregations

TimerFiredEventAttributes (com.uber.cadence.TimerFiredEventAttributes)2 HistoryEvent (com.uber.cadence.HistoryEvent)1