Package io.atomix.utils
Interface Managed<T>
-
- Type Parameters:
T- managed type
public interface Managed<T>Interface for types that can be asynchronously started and stopped.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanisRunning()Returns a boolean value indicating whether the managed object is running.CompletableFuture<T>start()Starts the managed object.CompletableFuture<Void>stop()Stops the managed object.
-
-
-
Method Detail
-
start
CompletableFuture<T> start()
Starts the managed object.- Returns:
- A completable future to be completed once the object has been started.
-
isRunning
boolean isRunning()
Returns a boolean value indicating whether the managed object is running.- Returns:
- Indicates whether the managed object is running.
-
stop
CompletableFuture<Void> stop()
Stops the managed object.- Returns:
- A completable future to be completed once the object has been stopped.
-
-