Class DefaultShutdownCallbackRegistry.RegisteredCancellable

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.ref.Reference<java.lang.Runnable> hook  
      private java.util.Collection<Cancellable> registered  
    • Constructor Summary

      Constructors 
      Constructor Description
      RegisteredCancellable​(java.lang.Runnable callback, java.util.Collection<Cancellable> registered)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void cancel()
      Cancels the execution of this Runnable callback.
      void run()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

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

      • hook

        private final java.lang.ref.Reference<java.lang.Runnable> hook
      • registered

        private java.util.Collection<Cancellable> registered
    • Constructor Detail

      • RegisteredCancellable

        RegisteredCancellable​(java.lang.Runnable callback,
                              java.util.Collection<Cancellable> registered)
    • Method Detail

      • cancel

        public void cancel()
        Description copied from interface: Cancellable
        Cancels the execution of this Runnable callback. This method has no effect if this has already executed.
        Specified by:
        cancel in interface Cancellable
      • run

        public void run()
        Specified by:
        run in interface java.lang.Runnable
      • toString

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