Class IndexFlushScheduler
- java.lang.Object
-
- com.atlassian.confluence.impl.search.IndexFlushScheduler
-
public class IndexFlushScheduler extends Object
Each time a flush is requested, this class will schedule a job to flush the index queue in 5 seconds, unless a flush has already been scheduled.- Since:
- 5.10
-
-
Constructor Summary
Constructors Constructor Description IndexFlushScheduler(com.atlassian.scheduler.SchedulerService schedulerService, String jobRunnerKeyAndId, com.atlassian.scheduler.config.RunMode runMode, long journalIgnoreWithinMillis, IncrementalIndexManager indexManager, FullReindexManager fullReindexManager)
IndexFlushScheduler(com.atlassian.scheduler.SchedulerService schedulerService, String jobRunnerKeyAndId, com.atlassian.scheduler.config.RunMode runMode, long journalIgnoreWithinMillis, IncrementalIndexManager indexManager, FullReindexManager fullReindexManager, BooleanSupplier indexFlushEnabledSupplier)
JobRunnerKey and JobId use same value.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Instant
getFirstRunTime()
void
requestFlush()
-
-
-
Constructor Detail
-
IndexFlushScheduler
public IndexFlushScheduler(com.atlassian.scheduler.SchedulerService schedulerService, String jobRunnerKeyAndId, com.atlassian.scheduler.config.RunMode runMode, long journalIgnoreWithinMillis, IncrementalIndexManager indexManager, FullReindexManager fullReindexManager)
-
IndexFlushScheduler
public IndexFlushScheduler(com.atlassian.scheduler.SchedulerService schedulerService, String jobRunnerKeyAndId, com.atlassian.scheduler.config.RunMode runMode, long journalIgnoreWithinMillis, IncrementalIndexManager indexManager, FullReindexManager fullReindexManager, BooleanSupplier indexFlushEnabledSupplier)
JobRunnerKey and JobId use same value. JobId must be the same at each schedule for runMode RUN_ONCE_PER_CLUSTER to work.- Parameters:
journalIgnoreWithinMillis
- Entries added to journal within the last given milliseconds are ignored.indexFlushEnabledSupplier
- Nullable; for optimisation, if non-null and returns false, nothing will happen whenDefaultIndexFlushRequester.RequestIndexFlushEvent
arrives
-
-
Method Detail
-
requestFlush
public void requestFlush()
-
getFirstRunTime
public Instant getFirstRunTime()
-
-