Class 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 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 when DefaultIndexFlushRequester.RequestIndexFlushEvent arrives
    • Method Detail

      • requestFlush

        public void requestFlush()
      • getFirstRunTime

        public Instant getFirstRunTime()