public class TaskClient extends Client
| Modifier and Type | Method and Description |
|---|---|
TaskStatus |
getStatus(TaskId id)
Get the status of a given task on the server
|
static TaskClient |
of(String host,
int port) |
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(TaskId id)
Stop a task using the given ID.
|
convert, exceptionFrom, main, serverIsRunningpublic static TaskClient of(String host, int port)
public 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 TaskStatus getStatus(TaskId id)
id - Identifier of the task to get status ofGraknBackendException - When the specified task has not yet been stored by the serverpublic boolean stopTask(TaskId id)
id - the ID of the task to stopCopyright © 2017 Grakn Labs Ltd. All rights reserved.