Skip to content

Commit 4161c62

Browse files

File tree

1 file changed

+19
-2
lines changed
  • AndroidAnnotations/androidannotations-api/src/main/java/org/androidannotations/annotations

1 file changed

+19
-2
lines changed

AndroidAnnotations/androidannotations-api/src/main/java/org/androidannotations/annotations/Background.java

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,26 @@
2828
@Retention(RetentionPolicy.CLASS)
2929
@Target(ElementType.METHOD)
3030
public @interface Background {
31-
String id() default ""; /* used for task cancellation */
31+
/**
32+
* Identifier for task cancellation.
33+
*
34+
* To cancel all tasks having a specified background id:
35+
*
36+
* <pre>
37+
* boolean mayInterruptIfRunning = true;
38+
* BackgroundExecutor.cancelAll(&quot;my_background_id&quot;, mayInterruptIfRunning);
39+
* </pre>
40+
**/
41+
String id() default "";
3242

33-
int delay() default 0; /* in milliseconds */
43+
/** Minimum delay, in milliseconds, before the background task is executed. */
44+
int delay() default 0;
3445

46+
/**
47+
* Serial execution group.
48+
*
49+
* All background tasks having the same <code>serial</code> will be executed
50+
* sequentially.
51+
**/
3552
String serial() default "";
3653
}

0 commit comments

Comments
 (0)