Package org.graylog2.bootstrap.preflight
Class GraylogCertificateProvisioningPeriodical
java.lang.Object
org.graylog2.plugin.periodical.Periodical
org.graylog2.bootstrap.preflight.GraylogCertificateProvisioningPeriodical
- All Implemented Interfaces:
Runnable
-
Constructor Summary
ConstructorDescriptionGraylogCertificateProvisioningPeriodical
(DataNodeProvisioningService dataNodeProvisioningService, CsrMongoStorage csrStorage, CertChainMongoStorage certMongoStorage, CaService caService, Configuration configuration, NodeService nodeService, CsrSigner csrSigner, ClusterConfigService clusterConfigService, String passwordSecret, IndexerJwtAuthTokenProvider indexerJwtAuthTokenProvider, PreflightConfigService preflightConfigService, NotificationService notificationService, CustomCAX509TrustManager trustManager) -
Method Summary
Modifier and TypeMethodDescriptionvoid
doRun()
int
protected org.slf4j.Logger
int
boolean
isDaemon()
Should this periodical be run as a daemon thread?boolean
Determines if this periodical should run only on the leader node.boolean
Defines if this thread should be called periodically or only once on startup.boolean
Start on this node? Useful to decide if to start the periodical based on local configuration.boolean
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.Methods inherited from class org.graylog2.plugin.periodical.Periodical
getParallelism, initialize, masterOnly, run
-
Constructor Details
-
GraylogCertificateProvisioningPeriodical
@Inject public GraylogCertificateProvisioningPeriodical(DataNodeProvisioningService dataNodeProvisioningService, CsrMongoStorage csrStorage, CertChainMongoStorage certMongoStorage, CaService caService, Configuration configuration, NodeService nodeService, CsrSigner csrSigner, ClusterConfigService clusterConfigService, @Named("password_secret") String passwordSecret, IndexerJwtAuthTokenProvider indexerJwtAuthTokenProvider, PreflightConfigService preflightConfigService, NotificationService notificationService, CustomCAX509TrustManager trustManager)
-
-
Method Details
-
doRun
public void doRun()- Specified by:
doRun
in classPeriodical
-
getLogger
@NotNull protected org.slf4j.Logger getLogger()- Specified by:
getLogger
in classPeriodical
-
runsForever
public boolean runsForever()Description copied from class:Periodical
Defines if this thread should be called periodically or only once on startup.- Specified by:
runsForever
in classPeriodical
- Returns:
-
stopOnGracefulShutdown
public boolean stopOnGracefulShutdown()Description copied from class:Periodical
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.- Specified by:
stopOnGracefulShutdown
in classPeriodical
- Returns:
-
leaderOnly
public boolean leaderOnly()Description copied from class:Periodical
Determines if this periodical should run only on the leader node.- Overrides:
leaderOnly
in classPeriodical
- Returns:
false
(default) if this periodical may run on every node.true
if it may run only on the leader node
-
startOnThisNode
public boolean startOnThisNode()Description copied from class:Periodical
Start on this node? Useful to decide if to start the periodical based on local configuration.- Specified by:
startOnThisNode
in classPeriodical
- Returns:
-
isDaemon
public boolean isDaemon()Description copied from class:Periodical
Should this periodical be run as a daemon thread?- Specified by:
isDaemon
in classPeriodical
- Returns:
-
getInitialDelaySeconds
public int getInitialDelaySeconds()- Specified by:
getInitialDelaySeconds
in classPeriodical
- Returns:
- Seconds to wait before starting the thread. 0 for runsForever() threads.
-
getPeriodSeconds
public int getPeriodSeconds()- Specified by:
getPeriodSeconds
in classPeriodical
- Returns:
- How long to wait between each execution of the thread. 0 for runsForever() threads.
-