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() |
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 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–2020 Apache Software Foundation. All rights reserved.