public interface TaskStateStorage
The base StateStorage interface.
Provides common methods for storing and accessing the state of tasks.
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsTask(TaskId id)
Returns whether the storage contains the given task
|
TaskState |
getState(TaskId id)
This is a copy of the internal TaskState object.
|
Set<TaskState> |
getTasks(TaskStatus taskStatus,
String taskClassName,
String createdBy,
EngineID runningOnEngine,
int limit,
int offset)
Return a Set of Pairs of tasks that match any of the criteria.
|
TaskId |
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.
|
TaskId newState(TaskState state) throws GraknBackendException
state - State to insert.GraknBackendExceptionBoolean updateState(TaskState state)
state - State to update.TaskState getState(TaskId id) throws GraknBackendException
id - String id of task.GraknBackendExceptionboolean containsTask(TaskId id)
id - String id of taskSet<TaskState> getTasks(TaskStatus taskStatus, String taskClassName, String createdBy, EngineID runningOnEngine, int limit, int offset)
taskStatus - See TaskStatus enum.taskClassName - String containing task class name. See TaskState.createdBy - String containing created by. See TaskState.runningOnEngine - Engine that the task is running on.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.