public class Tasks
extends java.lang.Object
ExecutorService for single thread case which returns the same
Future for Tasks.Tasks with the same id.| Modifier and Type | Class and Description |
|---|---|
static interface |
Tasks.Callback<T> |
static class |
Tasks.Task<T> |
| Modifier and Type | Field and Description |
|---|---|
static java.lang.Long |
ID_LIST |
static java.lang.Long |
ID_STRICT |
Log.Module |
L |
| Constructor and Description |
|---|
Tasks(java.lang.String name) |
| Modifier and Type | Method and Description |
|---|---|
<T> java.util.concurrent.Future<T> |
run(Tasks.Task<T> task)
Runs
Tasks.Task supplied in a single thread executor in a way which omits duplicate tasks
which are scheduled to run prior to last one. |
public final Log.Module L
public static final java.lang.Long ID_STRICT
public static final java.lang.Long ID_LIST
public <T> java.util.concurrent.Future<T> run(Tasks.Task<T> task)
Tasks.Task supplied in a single thread executor in a way which omits duplicate tasks
which are scheduled to run prior to last one.
Example: tasks ABCD, adding task C, queue becomes ABDC.T - Callable result typetask - task to run