Class Context
- java.lang.Object
-
- org.apache.tinkerpop.gremlin.server.Context
-
public class Context extends Object
The context of Gremlin Server within which a particular request is made.- Author:
- Stephen Mallette (http://stephen.genoprime.com)
-
-
Constructor Summary
Constructors Constructor Description Context(RequestMessage requestMessage, io.netty.channel.ChannelHandlerContext ctx, Settings settings, GraphManager graphManager, GremlinExecutor gremlinExecutor, ScheduledExecutorService scheduledExecutorService)Context(RequestMessage requestMessage, io.netty.channel.ChannelHandlerContext ctx, Settings settings, GraphManager graphManager, GremlinExecutor gremlinExecutor, ScheduledExecutorService scheduledExecutorService, HttpGremlinEndpointHandler.RequestState requestState)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description io.netty.channel.ChannelHandlerContextgetChannelHandlerContext()Gets the Netty context.GraphManagergetGraphManager()Gets the set ofGraphobjects configured in Gremlin Server.GremlinExecutorgetGremlinExecutor()Gets the executor chosen to evaluate incoming Gremlin scripts based on the request.StringgetMaterializeProperties()RequestMessagegetRequestMessage()Gets the current request to Gremlin Server.HttpGremlinEndpointHandler.RequestStategetRequestState()longgetRequestTimeout()The timeout for the request.ScheduledExecutorServicegetScheduledExecutorService()SettingsgetSettings()Gets the current configuration of Gremlin Server.booleangetStartedResponse()Gets whether the server has started processing the response for this request.ScheduledFuture<?>getTimeoutExecutor()voidhandleDetachment(List<Object> aggregate)voidsetRequestState(HttpGremlinEndpointHandler.RequestState requestState)voidsetStartedResponse()Signal that the server has started processing the response.voidsetTimeoutExecutor(ScheduledFuture<?> timeoutExecutor)
-
-
-
Constructor Detail
-
Context
public Context(RequestMessage requestMessage, io.netty.channel.ChannelHandlerContext ctx, Settings settings, GraphManager graphManager, GremlinExecutor gremlinExecutor, ScheduledExecutorService scheduledExecutorService)
-
Context
public Context(RequestMessage requestMessage, io.netty.channel.ChannelHandlerContext ctx, Settings settings, GraphManager graphManager, GremlinExecutor gremlinExecutor, ScheduledExecutorService scheduledExecutorService, HttpGremlinEndpointHandler.RequestState requestState)
-
-
Method Detail
-
setTimeoutExecutor
public void setTimeoutExecutor(ScheduledFuture<?> timeoutExecutor)
-
getTimeoutExecutor
public ScheduledFuture<?> getTimeoutExecutor()
-
getRequestTimeout
public long getRequestTimeout()
The timeout for the request. If the request is a script it examines the script for a timeout setting usingwith(). If that is not found then it examines the request itself to see if the timeout is provided byTokens.TIMEOUT_MS. If that is not provided then theSettings.evaluationTimeoutis utilized as the default.
-
getMaterializeProperties
public String getMaterializeProperties()
-
getScheduledExecutorService
public ScheduledExecutorService getScheduledExecutorService()
-
getRequestMessage
public RequestMessage getRequestMessage()
Gets the current request to Gremlin Server.
-
getChannelHandlerContext
public io.netty.channel.ChannelHandlerContext getChannelHandlerContext()
Gets the Netty context.
-
getSettings
public Settings getSettings()
Gets the current configuration of Gremlin Server.
-
getGraphManager
public GraphManager getGraphManager()
Gets the set ofGraphobjects configured in Gremlin Server.
-
getGremlinExecutor
public GremlinExecutor getGremlinExecutor()
Gets the executor chosen to evaluate incoming Gremlin scripts based on the request.
-
getStartedResponse
public boolean getStartedResponse()
Gets whether the server has started processing the response for this request.
-
setStartedResponse
public void setStartedResponse()
Signal that the server has started processing the response.
-
getRequestState
public HttpGremlinEndpointHandler.RequestState getRequestState()
-
setRequestState
public void setRequestState(HttpGremlinEndpointHandler.RequestState requestState)
-
-