All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.transferwise.tasks.handler.interfaces.ITaskRetryPolicy Maven / Gradle / Ivy

There is a newer version: 1.43.0
Show newest version
package com.transferwise.tasks.handler.interfaces;

import com.transferwise.tasks.domain.IBaseTask;
import com.transferwise.tasks.domain.ITask;
import java.time.ZonedDateTime;

@SuppressWarnings("unused")
public interface ITaskRetryPolicy {

  ZonedDateTime getRetryTime(ITask task, Throwable t);

  /**
   * Should we reset the task processingTriesCount when the processing method returns COMMIT_AND_RETRY? For jobs, you usually want true. For tasks
   * that should be retried only a limited amount of time, return false. This applies ONLY in case processing returning COMMIT_AND_RETRY, not on
   * exceptions.
   */
  default boolean resetTriesCountOnSuccess(IBaseTask task) {
    return false;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy