org.apache.tinkerpop.gremlin.server.util

## Class ServerGremlinExecutor

- java.lang.Object
- - org.apache.tinkerpop.gremlin.server.util.ServerGremlinExecutor

-     public class ServerGremlinExecutor
      extends Object

  The core of script execution in Gremlin Server. Given `Settings` and optionally other arguments, this class will construct a `GremlinExecutor` to be used by Gremlin Server. A typical usage would be to instantiate the `GremlinServer` and then immediately call `GremlinServer.getServerGremlinExecutor()` which would allow the opportunity to assign "host options" which could be used by a custom `Channelizer`. Add these options before calling `GremlinServer.start()` to be sure the `Channelizer` gets access to those.
  Author:
    Stephen Mallette (http://stephen.genoprime.com)

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ServerGremlinExecutor(Settings settings, ExecutorService gremlinExecutorService, ScheduledExecutorService scheduledExecutorService)` Create a new object from `Settings` where thread pools are externally assigned.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addHostOption(String key, Object value)`
    `void` | `clearHostOptions()`
    `GraphManager` | `getGraphManager()`
    `GremlinExecutor` | `getGremlinExecutor()`
    `ExecutorService` | `getGremlinExecutorService()`
    `List<LifeCycleHook>` | `getHooks()`
    `Map<String,Object>` | `getHostOptions()`
    `ScheduledExecutorService` | `getScheduledExecutorService()`
    `Settings` | `getSettings()`
    `Object` | `removeHostOption(String key)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ServerGremlinExecutor

          public ServerGremlinExecutor(Settings settings,
                                       ExecutorService gremlinExecutorService,
                                       ScheduledExecutorService scheduledExecutorService)

      Create a new object from `Settings` where thread pools are externally assigned. Note that if the `scheduleExecutorServiceClass` is set to `null` it will be created via `Executors.newScheduledThreadPool(int, ThreadFactory)`. If either of the `ExecutorService` instances are supplied, the `Settings.gremlinPool` value will be ignored for the pool size.

  - ### Method Detail

    - #### addHostOption

          public void addHostOption(String key,
                                    Object value)

    - #### getHostOptions

          public Map<String,Object> getHostOptions()

    - #### removeHostOption

          public Object removeHostOption(String key)

    - #### clearHostOptions

          public void clearHostOptions()

    - #### getScheduledExecutorService

          public ScheduledExecutorService getScheduledExecutorService()

    - #### getGremlinExecutor

          public GremlinExecutor getGremlinExecutor()

    - #### getGremlinExecutorService

          public ExecutorService getGremlinExecutorService()

    - #### getGraphManager

          public GraphManager getGraphManager()

    - #### getSettings

          public Settings getSettings()

    - #### getHooks

          public List<LifeCycleHook> getHooks()

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