public interface BackgroundTask
| Modifier and Type | Method and Description |
|---|---|
void |
pause()
Called to suspend the execution of a currently running task.
|
boolean |
resume(java.util.function.Consumer<TaskCheckpoint> saveCheckpoint,
TaskCheckpoint lastCheckpoint)
This method may be called when resuming from a paused state or recovering from a crash or failure of any kind.
|
boolean |
start(java.util.function.Consumer<TaskCheckpoint> saveCheckpoint,
mjson.Json configuration)
Called to start execution of the task, may be called on a newly scheduled or previously stopped task.
|
boolean |
stop()
Called to stop execution of the task, may be called on a running or paused task.
|
boolean start(java.util.function.Consumer<TaskCheckpoint> saveCheckpoint, mjson.Json configuration)
saveCheckpoint - Consumerboolean stop()
void pause()
boolean resume(java.util.function.Consumer<TaskCheckpoint> saveCheckpoint, TaskCheckpoint lastCheckpoint)
saveCheckpoint - ConsumerlastCheckpoint - The last checkpoint as sent to saveCheckpoint.Copyright © 2017 Grakn Labs Ltd. All rights reserved.