Package convex.core.util
Class Shutdown
java.lang.Object
convex.core.util.Shutdown
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 Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final int
-
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
CLIENTHTTP
public static final int CLIENTHTTP- See Also:
-
SERVER
public static final int SERVER- See Also:
-
ETCH
public static final int ETCH- See Also:
-
EXECUTOR
public static final int EXECUTOR- See Also:
-
CLI
public static final int CLI- See Also:
-
-
Constructor Details
-
Shutdown
public Shutdown()
-
-
Method Details
-
addHook
Add a Runnable shutdown hook with the given priority. Lower priority numbers will be executed first.- Parameters:
priority
- Priority number for shutdown hookshutdownTask
- Runnable instance to execute on shutdown
-