Class Session
- java.lang.Object
- 
- org.apache.tinkerpop.gremlin.server.op.session.Session
 
- 
 public class Session extends Object Defines a "session" for theSessionOpProcessorwhich preserves state between requests made to Gremlin Server. Since transactions are bound to a single thread the "session" maintains its own thread to process Gremlin statements so that each request can be executed within it to preserve the transaction state from one request to the next.- Author:
- Stephen Mallette (http://stephen.genoprime.com)
 
- 
- 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanacceptingRequests()BindingsgetBindings()ExecutorServicegetExecutor()GremlinExecutorgetGremlinExecutor()StringgetSessionId()booleanisBoundTo(io.netty.channel.Channel channel)Determines if the suppliedChannelobject is the same as the one bound to theSession.voidkill(boolean force)Kills the session and rollback any uncommitted changes on transactional graphs.voidmanualKill(boolean force)Stops the session with call tokill(boolean)but also stops the session expiration call which ensures that the session is only killed once.voidtouch()
 
- 
- 
- 
Constructor Detail- 
Sessionpublic Session(String session, Context context, ConcurrentHashMap<String,Session> sessions) 
 
- 
 - 
Method Detail- 
isBoundTopublic boolean isBoundTo(io.netty.channel.Channel channel) Determines if the suppliedChannelobject is the same as the one bound to theSession.
 - 
getGremlinExecutorpublic GremlinExecutor getGremlinExecutor() 
 - 
getBindingspublic Bindings getBindings() 
 - 
getExecutorpublic ExecutorService getExecutor() 
 - 
getSessionIdpublic String getSessionId() 
 - 
acceptingRequestspublic boolean acceptingRequests() 
 - 
touchpublic void touch() 
 - 
manualKillpublic void manualKill(boolean force) Stops the session with call tokill(boolean)but also stops the session expiration call which ensures that the session is only killed once. Seekill(boolean)for information on how what "forcing" the session kill will mean.
 - 
killpublic void kill(boolean force) Kills the session and rollback any uncommitted changes on transactional graphs. When "force" closed, the session won't bother to try to submit transaction close commands. It will be up to the underlying graph implementation to determine how it will clean up orphaned transactions. The force will try to cancel scheduled jobs and interrupt any currently running ones. Interruption is not guaranteed, but an attempt will be made.
 
- 
 
-