@Override // guarded by super#lifecycleLock protected void doStart() { if (!this.initialized) { this.onInit(); } Assert.state(this.getTaskScheduler() != null, "unable to start polling, no taskScheduler available"); this.runningTask = this.getTaskScheduler().schedule(this.poller, this.trigger); }
public void start() { synchronized (this.lifecycleMonitor) { if (this.isRunning()) { return; } Assert.state(this.taskScheduler != null, "TaskScheduler must not be null"); this.reaperFutureTask = this.taskScheduler.schedule(new PrunerTask(), new IntervalTrigger(this.reaperInterval, TimeUnit.MILLISECONDS)); } }