Interface NonBlockingManager

  • All Known Implementing Classes:
    NonBlockingManagerImpl

    public interface NonBlockingManager
    Manager utility for non-blocking operations.
    • Method Detail

      • scheduleWithFixedDelay

        AutoCloseable scheduleWithFixedDelay​(Supplier<CompletionStage<?>> supplier,
                                             long initialDelay,
                                             long delay,
                                             TimeUnit unit)
        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.
        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.