Package io.activej.async.service
Interface EventloopService
-
- All Known Implementing Classes:
EventloopTaskScheduler
public interface EventloopServiceThis interface is for services that can be started and then stopped in the context of eventloop, so it works withPromise
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description @NotNull EventloopgetEventloop()@NotNull Promise<?>start()Starts this component asynchronously.default @NotNull CompletableFuture<?>startFuture()@NotNull Promise<?>stop()Stops this component asynchronously.default @NotNull CompletableFuture<?>stopFuture()
-
-
-
Method Detail
-
getEventloop
@NotNull @NotNull Eventloop getEventloop()
-
start
@NotNull @NotNull Promise<?> start()
Starts this component asynchronously. Callback completes immediately if the component is already running.
-
startFuture
@NotNull default @NotNull CompletableFuture<?> startFuture()
-
stop
@NotNull @NotNull Promise<?> stop()
Stops this component asynchronously. Callback completes immediately if the component is not running / already stopped.
-
stopFuture
@NotNull default @NotNull CompletableFuture<?> stopFuture()
-
-