Class ServerGremlinExecutor
java.lang.Object
org.apache.tinkerpop.gremlin.server.util.ServerGremlinExecutor
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)
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal com.codahale.metrics.GaugeThe total number of paused channels.final com.codahale.metrics.GaugeThe total number of channels. -
Constructor Summary
ConstructorsConstructorDescriptionServerGremlinExecutor(Settings settings, ExecutorService gremlinExecutorService, ScheduledExecutorService scheduledExecutorService) Create a new object fromSettingswhere thread pools are externally assigned. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddHostOption(String key, Object value) voidlongGets the number of open channels.io.netty.channel.group.DefaultChannelGroupGets all open channels (excluding theServerSocketChannel).getHooks()longGets the number of open channels currently in a paused state that are not writeable.removeHostOption(String key)
-
Field Details
-
channelsTotalGauge
public final com.codahale.metrics.Gauge channelsTotalGaugeThe total number of channels. -
channelsPausedGauge
public final com.codahale.metrics.Gauge channelsPausedGaugeThe total number of paused channels.
-
-
Constructor Details
-
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 Details
-
addHostOption
-
getHostOptions
-
removeHostOption
-
clearHostOptions
public void clearHostOptions() -
getScheduledExecutorService
-
getGremlinExecutor
-
getGremlinExecutorService
-
getGraphManager
-
getTransactionManager
-
getSettings
-
getHooks
-
getChannels
public io.netty.channel.group.DefaultChannelGroup getChannels()Gets all open channels (excluding theServerSocketChannel). -
getPausedChannelCount
public long getPausedChannelCount()Gets the number of open channels currently in a paused state that are not writeable. -
getChannelCount
public long getChannelCount()Gets the number of open channels.
-