ThriftSessionManager (apache-cassandra API)
Date: 2018-02-12

org.apache.cassandra.thrift

## Class ThriftSessionManager

- java.lang.Object
- - org.apache.cassandra.thrift.ThriftSessionManager

-     public class ThriftSessionManager
      extends java.lang.Object

  Encapsulates the current client state (session). We rely on the Thrift server to tell us what socket it is executing a request for via setCurrentSocket, after which currentSession can do its job anywhere.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static ThriftSessionManager` | `instance`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ThriftSessionManager()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `connectionComplete(java.net.SocketAddress socket)` The connection associated with @param socket is permanently finished.
    `ThriftClientState` | `currentSession()`
    `int` | `getConnectedClients()`
    `void` | `setCurrentSocket(java.net.SocketAddress socket)`

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

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

- - ### Field Detail

    - #### instance

          public static final ThriftSessionManager instance

  - ### Constructor Detail

    - #### ThriftSessionManager

          public ThriftSessionManager()

  - ### Method Detail

    - #### setCurrentSocket

          public void setCurrentSocket(java.net.SocketAddress socket)

      Parameters:
        `socket` - the address on which the current thread will work on requests for until further notice

    - #### currentSession

          public ThriftClientState currentSession()

      Returns:
        the current session for the most recently given socket on this thread

    - #### connectionComplete

          public void connectionComplete(java.net.SocketAddress socket)

      The connection associated with @param socket is permanently finished.

    - #### getConnectedClients

          public int getConnectedClients()

Copyright © 2018 The Apache Software Foundation