public interface TaskManager extends AutoCloseable
The base TaskManager interface.
Provides common methods for scheduling tasks for execution and stopping task execution.
| Modifier and Type | Method and Description |
|---|---|
void |
addTask(TaskState taskState)
Schedule a single shot/one off BackgroundTask to run after a @delay in milliseconds.
|
default TaskStateStorage |
chooseStorage(GraknEngineConfig properties,
ZookeeperConnection zookeeper) |
void |
stopTask(TaskId id)
Stop a Scheduled, Paused or Running task.
|
TaskStateStorage |
storage()
Return the StateStorage instance that is used by this class.
|
closevoid addTask(TaskState taskState)
taskState - Task to executevoid stopTask(TaskId id)
id - ID of task to stop.TaskStateStorage storage()
default TaskStateStorage chooseStorage(GraknEngineConfig properties, ZookeeperConnection zookeeper)
Copyright © 2017 Grakn Labs Ltd. All rights reserved.