Change internals of TaskExecutorRepeatTemplate to distinguish between error condition and success in a more type-safe way.