public class UpdatingInstanceCountTask extends Object implements BackgroundTask
Task that controls when types are updated with their new instance counts
This task begins only if enough time has passed (configurable) since the last time a job was added.
| Constructor and Description |
|---|
UpdatingInstanceCountTask() |
| 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.
|
public boolean start(java.util.function.Consumer<TaskCheckpoint> saveCheckpoint, mjson.Json configuration)
BackgroundTaskstart in interface BackgroundTasksaveCheckpoint - Consumerpublic 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.