public class IndexFieldTypePollerPeriodical extends Periodical
Periodical that creates and maintains index field type information in the database.| Constructor and Description |
|---|
IndexFieldTypePollerPeriodical(IndexFieldTypePoller poller,
IndexFieldTypesService dbService,
IndexSetService indexSetService,
Indices indices,
MongoIndexSet.Factory mongoIndexSetFactory,
Cluster cluster,
com.google.common.eventbus.EventBus eventBus,
ServerStatus serverStatus,
com.github.joschi.jadconfig.util.Duration periodicalInterval,
ScheduledExecutorService scheduler) |
| Modifier and Type | Method and Description |
|---|---|
void |
doRun()
This creates index field type information for each index in each index set and schedules polling jobs to
keep the data for active write indices up to date.
|
int |
getInitialDelaySeconds() |
protected org.slf4j.Logger |
getLogger() |
int |
getPeriodSeconds() |
void |
handleIndexDeletion(IndicesDeletedEvent event)
Removes the index field type data for the deleted index.
|
void |
handleIndexSetCreation(IndexSetCreatedEvent event)
Creates a new field type polling job for the newly created index set.
|
void |
handleIndexSetDeletion(IndexSetDeletedEvent event)
Removes the field type polling job for the now deleted index set.
|
boolean |
isDaemon()
Should this periodical be run as a daemon thread?
|
boolean |
masterOnly()
Only start this thread on master nodes?
|
boolean |
runsForever()
Defines if this thread should be called periodically or only once
on startup.
|
boolean |
startOnThisNode()
Start on this node? Useful to decide if to start the periodical based on local configuration.
|
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.
|
getParallelism, initialize, run@Inject public IndexFieldTypePollerPeriodical(IndexFieldTypePoller poller, IndexFieldTypesService dbService, IndexSetService indexSetService, Indices indices, MongoIndexSet.Factory mongoIndexSetFactory, Cluster cluster, com.google.common.eventbus.EventBus eventBus, ServerStatus serverStatus, @Named(value="index_field_type_periodical_interval") com.github.joschi.jadconfig.util.Duration periodicalInterval, @Named(value="daemonScheduler") ScheduledExecutorService scheduler)
public void doRun()
Since we create polling jobs for the active write indices, this periodical doesn't need to be run very often.
doRun in class Periodicalpublic void handleIndexSetCreation(IndexSetCreatedEvent event)
event - index set creation eventpublic void handleIndexSetDeletion(IndexSetDeletedEvent event)
event - index set deletion eventpublic void handleIndexDeletion(IndicesDeletedEvent event)
event - index deletion eventpublic boolean runsForever()
PeriodicalrunsForever in class Periodicalpublic boolean stopOnGracefulShutdown()
PeriodicalstopOnGracefulShutdown in class Periodicalpublic boolean masterOnly()
PeriodicalmasterOnly in class Periodicalpublic boolean startOnThisNode()
PeriodicalstartOnThisNode in class Periodicalpublic boolean isDaemon()
PeriodicalisDaemon in class Periodicalpublic int getInitialDelaySeconds()
getInitialDelaySeconds in class Periodicalpublic int getPeriodSeconds()
getPeriodSeconds in class Periodicalprotected org.slf4j.Logger getLogger()
getLogger in class PeriodicalCopyright © 2012–2021 Graylog, Inc.. All rights reserved.