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) |
| Modifier and Type | Method and Description |
|---|---|
void |
addTask(TaskState taskState)
Schedule a single shot/one off BackgroundTask to run after a @delay in milliseconds.
|
void |
close() |
TaskManager |
open() |
void |
stopTask(TaskId id)
Stop a Scheduled, Paused or Running task.
|
TaskStateStorage |
storage()
Return the StateStorage instance that is used by this class.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitchooseStoragepublic StandaloneTaskManager(EngineID engineId)
public TaskManager open()
public void close()
close in interface AutoCloseablepublic void addTask(TaskState taskState)
TaskManageraddTask in interface TaskManagertaskState - 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.