public class MutatorTask extends Object implements BackgroundTask
| Constructor and Description |
|---|
MutatorTask() |
| 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,
TaskConfiguration configuration,
TaskSubmitter taskSubmitter)
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.
|
public boolean start(java.util.function.Consumer<TaskCheckpoint> saveCheckpoint, TaskConfiguration configuration, TaskSubmitter taskSubmitter)
BackgroundTaskstart in interface BackgroundTasksaveCheckpoint - Consumerconfiguration - The configuration needed to execute the tasktaskSubmitter - Allows followup tasks to be submitted for processingpublic boolean stop()
BackgroundTaskstop in interface BackgroundTaskpublic void pause()
BackgroundTaskpause in interface BackgroundTaskpublic boolean resume(java.util.function.Consumer<TaskCheckpoint> saveCheckpoint, TaskCheckpoint lastCheckpoint)
BackgroundTaskresume in interface BackgroundTasksaveCheckpoint - ConsumerlastCheckpoint - The last checkpoint as sent to saveCheckpoint.Copyright © 2017 Grakn Labs Ltd. All rights reserved.