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. GivenSettings
and optionally other arguments, this class will construct aGremlinExecutor
to be used by Gremlin Server. A typical usage would be to instantiate theGremlinServer
and 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 theChannelizer
gets 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 fromSettings
where thread pools are externally assigned.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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)
-
-
-
Constructor Detail
-
ServerGremlinExecutor
public ServerGremlinExecutor(Settings settings, ExecutorService gremlinExecutorService, ScheduledExecutorService scheduledExecutorService)
Create a new object fromSettings
where thread pools are externally assigned. Note that if thescheduleExecutorServiceClass
is set tonull
it will be created viaExecutors.newScheduledThreadPool(int, ThreadFactory)
. If either of theExecutorService
instances are supplied, theSettings.gremlinPool
value 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()
-
-