org.apache.tinkerpop.gremlin.server.util

## 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 and 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 and 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.

Copyright © 2013–2021 Apache Software Foundation. All rights reserved.