public class StandaloneTaskManager extends Object implements TaskManager
In-memory task manager to schedule and execute tasks. By default this task manager uses an in-memory state storage.
If engine fails while using this task manager, there will be no possibility for task recovery.
| Constructor and Description |
|---|
StandaloneTaskManager(EngineID engineId,
GraknEngineConfig config,
RedisConnection redis,
EngineGraknGraphFactory factory) |
| Modifier and Type | Method and Description |
|---|---|
void |
addTask(TaskState taskState,
TaskConfiguration configuration)
Schedule a
BackgroundTask for execution. |
void |
close() |
void |
stopTask(TaskId id)
Stop a Scheduled, Paused or Running task.
|
TaskStateStorage |
storage()
Return the StateStorage instance that is used by this class.
|
public StandaloneTaskManager(EngineID engineId, GraknEngineConfig config, RedisConnection redis, EngineGraknGraphFactory factory)
public void close()
close in interface TaskManagerpublic void addTask(TaskState taskState, TaskConfiguration configuration)
TaskSubmitterBackgroundTask for execution.addTask in interface TaskSubmittertaskState - Task to executepublic void stopTask(TaskId id)
TaskManagerstopTask in interface TaskManagerid - ID of task to stop.public TaskStateStorage storage()
TaskManagerstorage in interface TaskManagerCopyright © 2017 Grakn Labs Ltd. All rights reserved.