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. GivenSettingsand optionally other arguments, this class will construct aGremlinExecutorto be used by Gremlin Server. A typical usage would be to instantiate theGremlinServerand then immediately callGremlinServer.getServerGremlinExecutor()which would allow the opportunity to assign "host options" which could be used by a customChannelizer. Add these options before callingGremlinServer.start()to be sure theChannelizergets access to those.- Author:
- Stephen Mallette (http://stephen.genoprime.com)
-
-
Constructor Summary
Constructors Constructor Description ServerGremlinExecutor(Settings settings, ExecutorService gremlinExecutorService, ScheduledExecutorService scheduledExecutorService)Create a new object fromSettingswhere thread pools are externally assigned.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddHostOption(String key, Object value)voidclearHostOptions()GraphManagergetGraphManager()GremlinExecutorgetGremlinExecutor()ExecutorServicegetGremlinExecutorService()List<LifeCycleHook>getHooks()Map<String,Object>getHostOptions()ScheduledExecutorServicegetScheduledExecutorService()SettingsgetSettings()ObjectremoveHostOption(String key)
-
-
-
Constructor Detail
-
ServerGremlinExecutor
public ServerGremlinExecutor(Settings settings, ExecutorService gremlinExecutorService, ScheduledExecutorService scheduledExecutorService)
Create a new object fromSettingswhere thread pools are externally assigned. Note that if thescheduleExecutorServiceClassis set tonullit will be created viaExecutors.newScheduledThreadPool(int, ThreadFactory). If either of theExecutorServiceinstances are supplied, theSettings.gremlinPoolvalue will be ignored for the pool size.
-
-
Method Detail
-
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()
-
-