Class Session


  • public class Session
    extends Object
    Defines a "session" for the 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.
    Author:
    Stephen Mallette (http://stephen.genoprime.com)
    • Method Detail

      • isBoundTo

        public boolean isBoundTo​(io.netty.channel.Channel channel)
        Determines if the supplied Channel object is the same as the one bound to the Session.
      • getBindings

        public Bindings getBindings()
      • getSessionId

        public String getSessionId()
      • acceptingRequests

        public boolean acceptingRequests()
      • touch

        public void touch()
      • manualKill

        public 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. See kill(boolean) for information on how what "forcing" the session kill will mean.
      • kill

        public 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.