Interface LifeCycleHook
-
public interface LifeCycleHook
Provides a method in which users can hook into the startup and shutdown lifecycle of Gremlin Server. Creating an instance of this interface in a Gremlin Server initialization script enables the ability to get a callback when the server starts and stops. The hook is guaranteed to execute once at in both cases.- Author:
- Stephen Mallette (http://stephen.genoprime.com)
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
LifeCycleHook.Context
Contains objects from the server that might be useful to scripting during the startup and shutdown process.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
onShutDown(LifeCycleHook.Context c)
Called when the server is shutdown.void
onStartUp(LifeCycleHook.Context c)
Called when the server starts up.
-
-
-
Method Detail
-
onStartUp
void onStartUp(LifeCycleHook.Context c)
Called when the server starts up. The graph collection will have been initialized at this point and all initialization scripts will have been executed when this callback is called.
-
onShutDown
void onShutDown(LifeCycleHook.Context c)
Called when the server is shutdown.
-
-