public class TaskClient extends Client
| Modifier and Type | Method and Description |
|---|---|
ai.grakn.engine.TaskStatus |
getStatus(ai.grakn.engine.TaskId id)
Get the status of a given task on the server
|
static TaskClient |
of(String host,
int port) |
ai.grakn.engine.TaskId |
sendTask(Class<?> taskClass,
String creator,
java.time.Instant runAt,
java.time.Duration interval,
mjson.Json configuration)
Submit a task to run on an Grakn Engine server
|
boolean |
stopTask(ai.grakn.engine.TaskId id)
Stop a task using the given ID.
|
convert, exceptionFrom, serverIsRunningpublic static TaskClient of(String host, int port)
public ai.grakn.engine.TaskId sendTask(Class<?> taskClass, String creator, java.time.Instant runAt, java.time.Duration interval, mjson.Json configuration)
taskClass - Class of the Task to runcreator - Class creating the taskrunAt - Time at which the task should be executedinterval - Interval at which the task should recur, can be nullconfiguration - Data on which to execute the taskpublic ai.grakn.engine.TaskStatus getStatus(ai.grakn.engine.TaskId id)
id - Identifier of the task to get status ofai.grakn.exception.EngineStorageException - When the specified task has not yet been stored by the serverpublic boolean stopTask(ai.grakn.engine.TaskId id)
id - the ID of the task to stopCopyright © 2017 Grakn Labs Ltd. All rights reserved.