public interface TaskStateStorage
The base StateStorage interface.
Provides common methods for storing and accessing the state of tasks.
| Modifier and Type | Method and Description |
|---|---|
TaskState |
getState(String id)
This is a copy of the internal TaskState object.
|
Set<TaskState> |
getTasks(TaskStatus taskStatus,
String taskClassName,
String createdBy,
int limit,
int offset)
Return a Set of Pairs of tasks that match any of the criteria.
|
String |
newState(TaskState state)
Create a new task state and store it, returning an ID to later access this task state.
|
Boolean |
updateState(TaskState state)
Used to update task state.
|
String newState(TaskState state) throws EngineStorageException
state - State to insert.EngineStorageExceptionBoolean updateState(TaskState state)
state - State to update.TaskState getState(String id) throws EngineStorageException
id - String id of task.EngineStorageExceptionSet<TaskState> getTasks(TaskStatus taskStatus, String taskClassName, String createdBy, int limit, int offset)
taskStatus - See TaskStatus enum.taskClassName - String containing task class name. See TaskState.createdBy - String containing created by. See TaskState.limit - Limit the returned result set to @limit amount of entries.offset - Use in conjunction with @limit for pagination.Copyright © 2017 Grakn Labs Ltd. All rights reserved.