private void sleepUntilNextRun(SweepOutcome outcome) throws InterruptedException { Duration sleepDuration = getBackoffTimeWhenSweepHasNotRun(); if (outcome == SweepOutcome.SUCCESS) { sleepDuration = Duration.ofMillis(sweepPauseMillis.get()); } else if (outcome == SweepOutcome.NOTHING_TO_SWEEP) { sleepDuration = getBackoffTimeWhenNothingToSweep(); } sleepFor(sleepDuration); }
private void waitUntilSpecificTableSweeperIsInitialized() throws InterruptedException { while (!specificTableSweeper.isInitialized()) { log.info("Sweep Priority Table and Sweep Progress Table are not initialized yet. If you have enabled " + "asynchronous initialization, these tables are being initialized asynchronously. Background " + "sweeper will start once the initialization is complete."); sleepFor(getBackoffTimeWhenSweepHasNotRun()); } }
sleepFor(getBackoffTimeWhenSweepHasNotRun()); log.info("Starting background sweeper with thread index {}", SafeArg.of("threadIndex", threadIndex)); while (true) {
private void sleepUntilNextRun(SweepOutcome outcome) throws InterruptedException { Duration sleepDuration = getBackoffTimeWhenSweepHasNotRun(); if (outcome == SweepOutcome.SUCCESS) { sleepDuration = Duration.ofMillis(sweepPauseMillis.get()); } else if (outcome == SweepOutcome.NOTHING_TO_SWEEP) { sleepDuration = getBackoffTimeWhenNothingToSweep(); } sleepFor(sleepDuration); }
private void waitUntilSpecificTableSweeperIsInitialized() throws InterruptedException { while (!specificTableSweeper.isInitialized()) { log.info("Sweep Priority Table and Sweep Progress Table are not initialized yet. If you have enabled " + "asynchronous initialization, these tables are being initialized asynchronously. Background " + "sweeper will start once the initialization is complete."); sleepFor(getBackoffTimeWhenSweepHasNotRun()); } }
sleepFor(getBackoffTimeWhenSweepHasNotRun()); log.info("Starting background sweeper with thread index {}", SafeArg.of("threadIndex", threadIndex)); while (true) {