@Test(timeout = 60_000) public void testScheduleMono() throws Exception { AtomicLong tickCounter = new AtomicLong(); ScheduleReference reference = localScheduler.scheduleMono( scheduleDescriptor.toBuilder().withName("testScheduleMono").build(), tick -> Mono.delay(Duration.ofMillis(1)).flatMap(t -> { tickCounter.incrementAndGet(); return Mono.empty(); }), Schedulers.parallel() ); testExecutionLifecycle(reference, tickCounter); }
@Override public ScheduleReference scheduleMono(ScheduleDescriptor scheduleDescriptor, Function<ExecutionContext, Mono<Void>> actionProducer, Scheduler scheduler) { return scheduleInternal(scheduleDescriptor, actionProducer, scheduler, DO_NOTHING); }
DefaultLocalScheduler implements LocalScheduler { @Override public ScheduleReference scheduleMono(ScheduleDescriptor scheduleDescriptor, Function<ExecutionContext, Mono<Void>> actionProducer, Scheduler scheduler) { return scheduleInternal(scheduleDescriptor, actionProducer, scheduler, DO_NOTHING); } }
DefaultLocalScheduler implements LocalScheduler { @Override public ScheduleReference scheduleMono(ScheduleDescriptor scheduleDescriptor, Function<ExecutionContext, Mono<Void>> actionProducer, Scheduler scheduler) { return scheduleInternal(scheduleDescriptor, actionProducer, scheduler, DO_NOTHING); } DefaultLocalScheduler(Duration internalLoopInterval, Scheduler scheduler, Clock clock, Registry registry); }
DefaultLocalScheduler implements LocalScheduler { @Override public ScheduleReference scheduleMono(ScheduleDescriptor scheduleDescriptor, Function<ExecutionContext, Mono<Void>> actionProducer, Scheduler scheduler) { return scheduleInternal(scheduleDescriptor, actionProducer, scheduler, DO_NOTHING); } DefaultLocalScheduler(Duration internalLoopInterval, Scheduler scheduler, Clock clock, Registry registry); void shutdown(); @Override List<Schedule> getActiveSchedules(); @Override List<Schedule> getArchivedSchedules(); @Override Optional<Schedule> findSchedule(String scheduleId); @Override Flux<LocalSchedulerEvent> events(); @Override ScheduleReference scheduleMono(ScheduleDescriptor scheduleDescriptor, Function<ExecutionContext, Mono<Void>> actionProducer, Scheduler scheduler); @Override ScheduleReference schedule(ScheduleDescriptor scheduleDescriptor, Consumer<ExecutionContext> action, boolean isolated); @Override ScheduleReference schedule(ScheduleDescriptor scheduleDescriptor, Consumer<ExecutionContext> action, ExecutorService executorService); @Override Mono<Void> cancel(String scheduleId); }
DefaultLocalScheduler implements LocalScheduler { @Override public ScheduleReference scheduleMono(ScheduleDescriptor scheduleDescriptor, Function<ExecutionContext, Mono<Void>> actionProducer, Scheduler scheduler) { return scheduleInternal(scheduleDescriptor, actionProducer, scheduler, DO_NOTHING); } DefaultLocalScheduler(Duration internalLoopInterval, Scheduler scheduler, Clock clock, Registry registry); void shutdown(); @Override List<Schedule> getActiveSchedules(); @Override List<Schedule> getArchivedSchedules(); @Override Optional<Schedule> findSchedule(String scheduleId); @Override Flux<LocalSchedulerEvent> events(); @Override ScheduleReference scheduleMono(ScheduleDescriptor scheduleDescriptor, Function<ExecutionContext, Mono<Void>> actionProducer, Scheduler scheduler); @Override ScheduleReference schedule(ScheduleDescriptor scheduleDescriptor, Consumer<ExecutionContext> action, boolean isolated); @Override ScheduleReference schedule(ScheduleDescriptor scheduleDescriptor, Consumer<ExecutionContext> action, ExecutorService executorService); @Override Mono<Void> cancel(String scheduleId);  }