public class ServerGremlinExecutor<T extends ScheduledExecutorService> extends Object
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.| Constructor and Description |
|---|
ServerGremlinExecutor(Settings settings,
Class<T> scheduleExecutorServiceClass)
Create a new object from
Settings where thread pools are internally created. |
ServerGremlinExecutor(Settings settings,
ExecutorService gremlinExecutorService,
T scheduledExecutorService,
Class<T> scheduleExecutorServiceClass)
Create a new object from
Settings where thread pools are externally assigned. |
ServerGremlinExecutor(Settings settings,
ExecutorService gremlinExecutorService,
T scheduledExecutorService,
Class<T> scheduleExecutorServiceClass,
GraphManager graphManager)
Create a new object from
Settings where thread pools are externally assigned. |
| 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() |
T |
getScheduledExecutorService() |
Settings |
getSettings() |
Object |
removeHostOption(String key) |
public ServerGremlinExecutor(Settings settings, Class<T> scheduleExecutorServiceClass)
Settings where thread pools are internally created. Note that the
scheduleExecutorServiceClass will be created via
Executors.newScheduledThreadPool(int, ThreadFactory).public ServerGremlinExecutor(Settings settings, ExecutorService gremlinExecutorService, T scheduledExecutorService, Class<T> scheduleExecutorServiceClass)
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. The
GraphManager will be constructed from the Settings.public ServerGremlinExecutor(Settings settings, ExecutorService gremlinExecutorService, T scheduledExecutorService, Class<T> scheduleExecutorServiceClass, GraphManager graphManager)
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.public void clearHostOptions()
public T getScheduledExecutorService()
public GremlinExecutor getGremlinExecutor()
public ExecutorService getGremlinExecutorService()
public GraphManager getGraphManager()
public Settings getSettings()
public List<LifeCycleHook> getHooks()
Copyright © 2013–2016 Apache Software Foundation. All rights reserved.