use of io.camunda.zeebe.engine.state.instance.TimerInstance in project zeebe by camunda.
the class TimerCancelledApplier method applyState.
@Override
public void applyState(final long key, final TimerRecord value) {
final TimerInstance timerInstance = timerInstanceState.get(value.getElementInstanceKey(), key);
timerInstanceState.remove(timerInstance);
}
use of io.camunda.zeebe.engine.state.instance.TimerInstance in project zeebe by camunda.
the class CancelTimerProcessor method processRecord.
@Override
public void processRecord(final TypedRecord<TimerRecord> record, final TypedResponseWriter responseWriter, final TypedStreamWriter streamWriter) {
final TimerRecord timer = record.getValue();
final TimerInstance timerInstance = timerInstanceState.get(timer.getElementInstanceKey(), record.getKey());
if (timerInstance == null) {
rejectionWriter.appendRejection(record, RejectionType.NOT_FOUND, String.format(NO_TIMER_FOUND_MESSAGE, record.getKey()));
} else {
stateWriter.appendFollowUpEvent(record.getKey(), TimerIntent.CANCELED, timer);
}
}
use of io.camunda.zeebe.engine.state.instance.TimerInstance in project zeebe by zeebe-io.
the class TimerCancelledApplier method applyState.
@Override
public void applyState(final long key, final TimerRecord value) {
final TimerInstance timerInstance = timerInstanceState.get(value.getElementInstanceKey(), key);
timerInstanceState.remove(timerInstance);
}
use of io.camunda.zeebe.engine.state.instance.TimerInstance in project zeebe by zeebe-io.
the class TimerTriggeredApplier method applyState.
@Override
public void applyState(final long key, final TimerRecord value) {
final long elementInstanceKey = value.getElementInstanceKey();
final TimerInstance timerInstance = timerInstanceState.get(elementInstanceKey, key);
timerInstanceState.remove(timerInstance);
}
use of io.camunda.zeebe.engine.state.instance.TimerInstance in project zeebe by camunda-cloud.
the class CancelTimerProcessor method processRecord.
@Override
public void processRecord(final TypedRecord<TimerRecord> record, final TypedResponseWriter responseWriter, final TypedStreamWriter streamWriter) {
final TimerRecord timer = record.getValue();
final TimerInstance timerInstance = timerInstanceState.get(timer.getElementInstanceKey(), record.getKey());
if (timerInstance == null) {
rejectionWriter.appendRejection(record, RejectionType.NOT_FOUND, String.format(NO_TIMER_FOUND_MESSAGE, record.getKey()));
} else {
stateWriter.appendFollowUpEvent(record.getKey(), TimerIntent.CANCELED, timer);
}
}
Aggregations