class CheckpointSchedulerAction implements ISchedulerAction {

    @Override
    public void execute(final ISchedulerEntry entry) throws SchedulerActionExecutionException {
        try {
            // Scheduling strategy or checkpoint actor may write a non-null value into "completed" field of entry state if the message
            // should be no more re-sent.
            // The entry will still be kept in both remote and local storage to avoid duplication of the message until it will be deleted.
            if (null != entry.getState().getValue(completedFieldName)) {
                // Checkpoint actor writes non-null value into "gotFeedback" field of the entry state when it gets a feedback from next
                // checkpoint.
                // If there was no feedback (the message did not reach next checkpoint before it ran out of re-send trials) then we should
                // execute a "failure action" that will handle the "lost" message.
                if (null == entry.getState().getValue(gotFeedbackFieldName)) {
                    IAction<IObject> failureAction = IOC.resolve(Keys.getOrAdd("checkpoint failure action"));

                    failureAction.execute((IObject) entry.getState().getValue(messageFieldName));
                }
                return;
            }

            IRecoverStrategy recoverStrategy = IOC.resolve(IOC.resolve(
                    IOC.getKeyForKeyStorage(),
                    entry.getState().getValue(recoverStrategyFieldName)
            ));

            recoverStrategy.reSend(entry.getState());
        } catch (ResolutionException | ReadValueException | InvalidArgumentException | RecoverStrategyExecutionException
                | ActionExecuteException e) {
            throw new SchedulerActionExecutionException("Error occurred executing checkpoint action.", e);
        }
    }

    public  CheckpointSchedulerAction();

}