Package org.infinispan.util.concurrent
Interface NonBlockingManager
-
- All Known Implementing Classes:
NonBlockingManagerImpl
public interface NonBlockingManagerManager utility for non-blocking operations.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description AutoCloseablescheduleWithFixedDelay(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.
-
-
-
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.
-
-