Class Shutdown

java.lang.Object
convex.core.util.Shutdown

public class Shutdown extends Object
So the JVM doesn't give us a nice way to run shutdown hooks in a defined order. This class enables us to do just that!
  • Field Details

  • Constructor Details

    • Shutdown

      public Shutdown()
  • Method Details

    • addHook

      public static void addHook(int priority, Runnable shutdownTask)
      Add a Runnable shutdown hook with the given priority. Lower priority numbers will be executed first.
      Parameters:
      priority - Priority number for shutdown hook
      shutdownTask - Runnable instance to execute on shutdown