org.apache.tinkerpop.gremlin.server.op.session

## Class Session

- java.lang.Object
- - org.apache.tinkerpop.gremlin.server.op.session.Session

-     public class Session
      extends Object

  Author:
    Stephen Mallette (http://stephen.genoprime.com)

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Session(String session, Context context, ConcurrentHashMap<String,Session> sessions)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `acceptingRequests()`
    `Bindings` | `getBindings()`
    `ExecutorService` | `getExecutor()`
    `GremlinExecutor` | `getGremlinExecutor()`
    `String` | `getSessionId()`
    `void` | `kill()` Deprecated. As of release 3.2.4, replaced by `kill(boolean)`.
    `void` | `kill(boolean force)` Kills the session and rollback any uncommitted changes on transactional graphs.
    `void` | `manualKill()` Deprecated. As of release 3.2.4, replaced by `manualKill(boolean)`.
    `void` | `manualKill(boolean force)` Stops the session with call to `kill()` but also stops the session expiration call which ensures that the session is only killed once.
    `void` | `touch()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### Session

          public Session(String session,
                         Context context,
                         ConcurrentHashMap<String,Session> sessions)

  - ### Method Detail

    - #### getGremlinExecutor

          public GremlinExecutor getGremlinExecutor()

    - #### getBindings

          public Bindings getBindings()

    - #### getExecutor

          public ExecutorService getExecutor()

    - #### getSessionId

          public String getSessionId()

    - #### acceptingRequests

          public boolean acceptingRequests()

    - #### touch

          public void touch()

    - #### manualKill

          @Deprecated
          public void manualKill()

      Deprecated. As of release 3.2.4, replaced by `manualKill(boolean)`.
      Stops the session with call to `kill()` but also stops the session expiration call which ensures that the session is only killed once. Calls `manualKill(boolean)` with `false`.

    - #### manualKill

          public void manualKill(boolean force)

      Stops the session with call to `kill()` 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

          @Deprecated
          public void kill()

      Deprecated. As of release 3.2.4, replaced by `kill(boolean)`.
      Kills the session and rollback any uncommitted changes on transactional graphs. Same as calling `kill(boolean)` with `false`.

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

Copyright © 2013–2019 Apache Software Foundation. All rights reserved.