org.apache.cassandra.thrift
Class ThriftSessionManager

java.lang.Object
  extended by 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
static ThriftSessionManager instance
           
 
Constructor Summary
ThriftSessionManager()
           
 
Method Summary
 void connectionComplete(java.net.SocketAddress socket)
          The connection associated with @param socket is permanently finished.
 ThriftClientState currentSession()
           
 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.



Copyright © 2013 The Apache Software Foundation