public interface TaskManager extends Closeable
The base TaskManager interface.
Provides common methods for scheduling tasks for execution and stopping task execution. At the moment it assumes that upon construction, some threads will be started that take care of consuming the elements of the queue.
| Modifier and Type | Method and Description |
|---|---|
void |
addTask(TaskState taskState,
TaskConfiguration configuration)
Schedule a
BackgroundTask for execution. |
void |
runTask(TaskState taskState,
TaskConfiguration configuration) |
CompletableFuture<Void> |
start()
Make sure the manager is initialized and starts processing tasks
|
TaskStateStorage |
storage()
Return the StateStorage instance that is used by this class.
|
void addTask(TaskState taskState, TaskConfiguration configuration)
BackgroundTask for execution.taskState - Task to executevoid runTask(TaskState taskState, TaskConfiguration configuration)
CompletableFuture<Void> start()
TaskStateStorage storage()
Copyright © 2017 Grakn Labs Ltd. All rights reserved.