public abstract class Periodical extends Object implements Runnable
| Constructor and Description |
|---|
Periodical() |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
doRun() |
abstract int |
getInitialDelaySeconds() |
protected abstract org.slf4j.Logger |
getLogger() |
int |
getParallelism() |
abstract int |
getPeriodSeconds() |
void |
initialize() |
abstract boolean |
isDaemon()
Should this periodical be run as a daemon thread?
|
boolean |
leaderOnly()
Determines if this periodical should run only on the leader node.
|
boolean |
masterOnly()
Deprecated.
Use
leaderOnly() instead. |
void |
run() |
abstract boolean |
runsForever()
Defines if this thread should be called periodically or only once
on startup.
|
abstract boolean |
startOnThisNode()
Start on this node? Useful to decide if to start the periodical based on local configuration.
|
abstract boolean |
stopOnGracefulShutdown()
Should this thread be stopped when a graceful shutdown is in progress?
This means that stop() is called and that is no longer triggered periodically.
|
public abstract boolean runsForever()
public abstract boolean stopOnGracefulShutdown()
@Deprecated public boolean masterOnly()
leaderOnly() instead.public boolean leaderOnly()
false (default) if this periodical may run on every node. true if it may run only on the
leader nodepublic abstract boolean startOnThisNode()
public abstract boolean isDaemon()
public abstract int getInitialDelaySeconds()
public abstract int getPeriodSeconds()
public void initialize()
@Nonnull protected abstract org.slf4j.Logger getLogger()
public abstract void doRun()
public int getParallelism()
Copyright © 2012–2022 Graylog, Inc.. All rights reserved.