public class TaskStateInMemoryStore extends Object implements TaskStateStorage
Implementation of StateStorage that stores task state in memory. If engine fails, task state recovery is not possible.
| Constructor and Description |
|---|
TaskStateInMemoryStore() |
| 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.
|
public String newState(TaskState state)
TaskStateStoragenewState in interface TaskStateStoragestate - State to insert.public Boolean updateState(TaskState state)
TaskStateStorageupdateState in interface TaskStateStoragestate - State to update.public TaskState getState(String id)
TaskStateStoragegetState in interface TaskStateStorageid - String id of task.public Set<TaskState> getTasks(TaskStatus taskStatus, String taskClassName, String createdBy, int limit, int offset)
TaskStateStoragegetTasks in interface TaskStateStoragetaskStatus - 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.