Package io.aether.utils.interfaces
Interface Destroyable
-
- All Known Implementing Classes:
Destroyer
public interface DestroyableThe Destroyable interface represents an object that can be destroyed. It provides a method to initiate the destruction process with an option to force it.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description AFuturedestroy(boolean force)Initiates the destruction process.static Destroyableof(java.lang.String name, Destroyable destroyable)Creates a new Destroyable instance with a specified name and delegate.
-
-
-
Method Detail
-
destroy
AFuture destroy(boolean force)
Initiates the destruction process.- Parameters:
force- If true, forces the destruction; otherwise, attempts a graceful shutdown.- Returns:
- An AFuture representing the result of the destruction process.
-
of
static Destroyable of(java.lang.String name, Destroyable destroyable)
Creates a new Destroyable instance with a specified name and delegate.- Parameters:
name- The name of the destroyable instance.destroyable- The delegate Destroyable instance whose destroy method will be called.- Returns:
- A new Destroyable instance.
-
-