public class PostProcessingTask extends Object implements BackgroundTask
Task that control when postprocessing starts.
This task begins only if enough time has passed (configurable) since the last time a job was added.
| Constructor and Description |
|---|
PostProcessingTask() |
| Modifier and Type | Method and Description |
|---|---|
static TaskConfiguration |
createConfig(String keyspace,
String config)
Helper method which creates the task config needed in order to execute a PP task
|
static TaskState |
createTask(Class creator)
Helper method which creates PP Task States.
|
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)
Apply CASTING and RESOURCE post processing jobs the concept ids in the provided configuration
|
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)
start in interface BackgroundTasksaveCheckpoint - Checkpointing is not implemented in this task, so this parameter is not used.configuration - Configuration containing the IDs to be post processed.taskSubmitter - 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.public static TaskState createTask(Class creator)
creator - The class which is creating the taskpublic static TaskConfiguration createConfig(String keyspace, String config)
keyspace - The keyspace of the graph to execute this on.config - The config which contains the concepts to post processCopyright © 2017 Grakn Labs Ltd. All rights reserved.