Class Destroyer

  • All Implemented Interfaces:
    Destroyable

    public class Destroyer
    extends java.lang.Object
    implements Destroyable
    • Field Summary

      Fields 
      Modifier and Type Field Description
      java.lang.String name  
    • Constructor Summary

      Constructors 
      Constructor Description
      Destroyer​(java.lang.String name)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(Destroyable destroyable)  
      void add​(java.lang.AutoCloseable os)  
      void add​(java.util.concurrent.ScheduledFuture<?> os)  
      AFuture destroy​(boolean force)
      Initiates the destruction process.
      boolean isDestroyed()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • name

        public final java.lang.String name
    • Constructor Detail

      • Destroyer

        public Destroyer​(java.lang.String name)
    • Method Detail

      • isDestroyed

        public boolean isDestroyed()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • destroy

        public AFuture destroy​(boolean force)
        Description copied from interface: Destroyable
        Initiates the destruction process.
        Specified by:
        destroy in interface Destroyable
        Parameters:
        force - If true, forces the destruction; otherwise, attempts a graceful shutdown.
        Returns:
        An AFuture representing the result of the destruction process.
      • add

        public void add​(java.util.concurrent.ScheduledFuture<?> os)
      • add

        public void add​(java.lang.AutoCloseable os)