Skip to content

Commit fccc669

Browse files
committed
javadoc added
1 parent d670e8d commit fccc669

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,36 @@
11
package com.enigmabridge.retry;
22

33
/**
4+
* Future object, similar to {@link java.util.concurrent.Future}
5+
*
6+
* Used in async job invocations. Can be used to detect if task is running or
7+
* finished. Caller can cancel the task or skip current backoff waiting interval.
8+
*
49
* Created by dusanklinec on 21.07.16.
510
*/
611
public interface EBFuture<Result, Error> {
12+
/**
13+
* Returns true if async task is still running.
14+
* @return true if running
15+
*/
716
boolean isRunning();
17+
18+
/**
19+
* Returns true if async task finished its execution.
20+
* @return true if done
21+
*/
822
boolean isDone();
23+
24+
/**
25+
* Triggers cancellation of the task.
26+
* Does not interrupt currently running job, disables invocation of the next attempt.
27+
*/
928
void cancel();
29+
30+
/**
31+
* If task is currently waiting in a backoff interval, this interrupts waiting and
32+
* immediately executes the task - skipping the waiting interval.
33+
* Like "Retry now" button in UI.
34+
*/
1035
void runNow();
1136
}

src/main/java/com/enigmabridge/retry/EBRetryJobSimpleSafeThrErr.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
package com.enigmabridge.retry;
22

33
/**
4+
* Retry Job implementation with job error = Throwable.
5+
*
6+
* Moreover all uncaught exceptions thrown in the job body are caught and considered as fail().
7+
*
48
* Created by dusanklinec on 25.07.16.
59
*/
610
public abstract class EBRetryJobSimpleSafeThrErr<Result> extends EBRetryJobSimpleSafe<Result, Throwable> {

0 commit comments

Comments
 (0)