Package org.graylog2.telemetry.scheduler
Class TelemetrySubmissionPeriodical
java.lang.Object
org.graylog2.plugin.periodical.Periodical
org.graylog2.telemetry.scheduler.TelemetrySubmissionPeriodical
- All Implemented Interfaces:
Runnable
-
Constructor Summary
ConstructorsConstructorDescriptionTelemetrySubmissionPeriodical(TelemetryClient telemetryClient, TelemetryConfiguration telemetryConfiguration, Map<String, TelemetryMetricSupplier> metricsProviders) -
Method Summary
Modifier and TypeMethodDescriptionvoiddoRun()intprotected org.slf4j.LoggerintbooleanisDaemon()Should this periodical be run as a daemon thread?booleanDefines if this thread should be called periodically or only once on startup.booleanStart on this node?booleanShould this thread be stopped when a graceful shutdown is in progress?Methods inherited from class org.graylog2.plugin.periodical.Periodical
getParallelism, initialize, leaderOnly, masterOnly, run
-
Constructor Details
-
TelemetrySubmissionPeriodical
@Inject public TelemetrySubmissionPeriodical(TelemetryClient telemetryClient, TelemetryConfiguration telemetryConfiguration, Map<String, TelemetryMetricSupplier> metricsProviders)
-
-
Method Details
-
doRun
public void doRun()- Specified by:
doRunin classPeriodical
-
runsForever
public boolean runsForever()Description copied from class:PeriodicalDefines if this thread should be called periodically or only once on startup.- Specified by:
runsForeverin classPeriodical- Returns:
-
stopOnGracefulShutdown
public boolean stopOnGracefulShutdown()Description copied from class:PeriodicalShould this thread be stopped when a graceful shutdown is in progress? This means that stop() is called and that is no longer triggered periodically.- Specified by:
stopOnGracefulShutdownin classPeriodical- Returns:
-
startOnThisNode
public boolean startOnThisNode()Description copied from class:PeriodicalStart on this node? Useful to decide if to start the periodical based on local configuration.- Specified by:
startOnThisNodein classPeriodical- Returns:
-
isDaemon
public boolean isDaemon()Description copied from class:PeriodicalShould this periodical be run as a daemon thread?- Specified by:
isDaemonin classPeriodical- Returns:
-
getInitialDelaySeconds
public int getInitialDelaySeconds()- Specified by:
getInitialDelaySecondsin classPeriodical- Returns:
- Seconds to wait before starting the thread. 0 for runsForever() threads.
-
getPeriodSeconds
public int getPeriodSeconds()- Specified by:
getPeriodSecondsin classPeriodical- Returns:
- How long to wait between each execution of the thread. 0 for runsForever() threads.
-
getLogger
@Nonnull protected org.slf4j.Logger getLogger()- Specified by:
getLoggerin classPeriodical
-