public abstract class BackgroundTask extends Object
| Constructor and Description |
|---|
BackgroundTask() |
| Modifier and Type | Method and Description |
|---|---|
TaskConfiguration |
configuration() |
GraknConfig |
engineConfiguration() |
EngineGraknTxFactory |
factory() |
void |
initialize(TaskConfiguration configuration,
GraknConfig engineConfig,
EngineGraknTxFactory factory,
com.codahale.metrics.MetricRegistry metricRegistry,
PostProcessor postProcessor)
Initialize the
BackgroundTask. |
com.codahale.metrics.MetricRegistry |
metricRegistry() |
PostProcessor |
postProcessor() |
abstract boolean |
start()
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 final void initialize(TaskConfiguration configuration, GraknConfig engineConfig, EngineGraknTxFactory factory, com.codahale.metrics.MetricRegistry metricRegistry, PostProcessor postProcessor)
BackgroundTask. This must be called prior to any other call to BackgroundTask.configuration - The configuration needed to execute the taskmetricRegistry - Metric registrypublic abstract boolean start()
public boolean stop()
This implementation always throws UnsupportedOperationException.
UnsupportedOperationException - if stopping the task is not supported
TODO: Should we allow start() to be called after stop()?public final TaskConfiguration configuration()
public final GraknConfig engineConfiguration()
public final EngineGraknTxFactory factory()
public final com.codahale.metrics.MetricRegistry metricRegistry()
public final PostProcessor postProcessor()
Copyright © 2017 Grakn Labs Ltd. All rights reserved.