Package org.jitsi.retry
Class SimpleRetryTask
-
- All Implemented Interfaces:
public class SimpleRetryTask extends RetryTask
Simple implementation of getCallable which stores callable method in the constructor.
Pawel Domas
-
-
Field Summary
Fields Modifier and Type Field Description public final longinitialDelaypublic final longretryDelay
-
Constructor Summary
Constructors Constructor Description SimpleRetryTask(long initialDelay, long retryDelay, boolean retryOnException, Callable<Boolean> retryJob)Initializes new instance of SimpleRetryTask.
-
Method Summary
Modifier and Type Method Description Callable<Boolean>getCallable()Returns a Callablewhich is the job to be executed by retry strategy.-
-
Constructor Detail
-
SimpleRetryTask
SimpleRetryTask(long initialDelay, long retryDelay, boolean retryOnException, Callable<Boolean> retryJob)
Initializes new instance of SimpleRetryTask.- Parameters:
initialDelay- how long we're going to wait before running task callable for the first time(in ms).retryDelay- how often are we going to retry(in ms).retryOnException- should we continue retry after callable throws unexpected Exception.retryJob- the callable job to be executed on retry.
-
-
Method Detail
-
getCallable
Callable<Boolean> getCallable()
Returns a
Callablewhich is the job to be executed by retry strategy. The task will be retried as long as it returns true or until the job is cancelled.
-
-
-
-