Interface Destroyable

  • All Known Subinterfaces:
    BMap<K,​V>
    All Known Implementing Classes:
    BMapImpl, Destroyer

    public interface Destroyable
    The 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 Detail

      • 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.
      • 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.