Class NonBlockingManagerImpl

    • Constructor Detail

      • NonBlockingManagerImpl

        public NonBlockingManagerImpl()
    • Method Detail

      • scheduleWithFixedDelay

        public AutoCloseable scheduleWithFixedDelay​(Supplier<CompletionStage<?>> supplier,
                                                    long initialDelay,
                                                    long delay,
                                                    TimeUnit unit)
        Description copied from interface: NonBlockingManager
        Schedules the supplier that is executed after the initialDelay period and subsequently runs delay after the previous stage completes. The supplier must not block the thread in which it runs and should immediately return to avoid blocking the scheduling thread.
        Specified by:
        scheduleWithFixedDelay in interface NonBlockingManager
        Parameters:
        supplier - non-blocking operation supplier.
        initialDelay - period of time before the supplier is invoked.
        delay - delay between subsequent supplier invocations.
        unit - time unit for delays.
        Returns:
        an AutoCloseable that cancels the scheduled task.