public interface TaskStateStorage
The base StateStorage interface.
Provides common methods for storing and accessing the state of tasks.
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
boolean |
containsTask(ai.grakn.engine.TaskId id)
Returns whether the storage contains the given task
|
TaskState |
getState(ai.grakn.engine.TaskId id)
This is a copy of the internal TaskState object.
|
Set<TaskState> |
getTasks(ai.grakn.engine.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.
|
ai.grakn.engine.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.
|
ai.grakn.engine.TaskId newState(TaskState state) throws ai.grakn.exception.GraknBackendException
state - State to insert.ai.grakn.exception.GraknBackendExceptionBoolean updateState(TaskState state)
state - State to update.TaskState getState(ai.grakn.engine.TaskId id) throws ai.grakn.exception.GraknBackendException
id - String id of task.ai.grakn.exception.GraknBackendExceptionboolean containsTask(ai.grakn.engine.TaskId id)
id - String id of taskSet<TaskState> getTasks(@Nullable ai.grakn.engine.TaskStatus taskStatus, @Nullable String taskClassName, @Nullable String createdBy, @Nullable 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.void clear()
Copyright © 2017 Grakn Labs Ltd. All rights reserved.