public class Session extends Object
SessionOpProcessor
which 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.Constructor and Description |
---|
Session(String session,
Context context,
ConcurrentHashMap<String,Session> sessions) |
Modifier and Type | Method and Description |
---|---|
boolean |
acceptingRequests() |
Bindings |
getBindings() |
ExecutorService |
getExecutor() |
GremlinExecutor |
getGremlinExecutor() |
String |
getSessionId() |
boolean |
isBoundTo(Channel channel)
Determines if the supplied
Channel object is the same as the one bound to the Session . |
void |
kill(boolean force)
Kills the session and rollback any uncommitted changes on transactional graphs.
|
void |
manualKill(boolean force)
Stops the session with call to
kill(boolean) but also stops the session expiration call which ensures
that the session is only killed once. |
void |
touch() |
public Session(String session, Context context, ConcurrentHashMap<String,Session> sessions)
public boolean isBoundTo(Channel channel)
Channel
object is the same as the one bound to the Session
.public GremlinExecutor getGremlinExecutor()
public Bindings getBindings()
public ExecutorService getExecutor()
public String getSessionId()
public boolean acceptingRequests()
public void touch()
public void manualKill(boolean force)
kill(boolean)
but also stops the session expiration call which ensures
that the session is only killed once. See kill(boolean)
for information on how what "forcing" the
session kill will mean.public void kill(boolean force)
Copyright © 2013–2021 Apache Software Foundation. All rights reserved.