org.apache.hadoop.hbase.ipc
Class HBaseServer.Connection

java.lang.Object
  extended by org.apache.hadoop.hbase.ipc.HBaseServer.Connection
Enclosing class:
HBaseServer

protected class HBaseServer.Connection
extends Object

Reads calls from a connection and queues them for handling.


Field Summary
protected  SocketChannel channel
           
protected  boolean closed
           
protected  String hostAddress
           
protected  int remotePort
           
protected  LinkedList<HBaseServer.Call> responseQueue
           
protected  Socket socket
           
protected  User ticket
           
 
Constructor Summary
HBaseServer.Connection(SocketChannel channel, long lastContact)
           
 
Method Summary
protected  void close()
           
protected  void decRpcCount()
           
 String getHostAddress()
           
 long getLastContact()
           
 int getRemotePort()
           
protected  void incRpcCount()
           
protected  void processData(byte[] buf)
           
 int readAndProcess()
           
 void setLastContact(long lastContact)
           
protected  boolean timedOut(long currentTime)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

closed

protected volatile boolean closed

channel

protected SocketChannel channel

responseQueue

protected final LinkedList<HBaseServer.Call> responseQueue

socket

protected Socket socket

hostAddress

protected String hostAddress

remotePort

protected int remotePort

ticket

protected User ticket
Constructor Detail

HBaseServer.Connection

public HBaseServer.Connection(SocketChannel channel,
                              long lastContact)
Method Detail

toString

public String toString()
Overrides:
toString in class Object

getHostAddress

public String getHostAddress()

getRemotePort

public int getRemotePort()

setLastContact

public void setLastContact(long lastContact)

getLastContact

public long getLastContact()

decRpcCount

protected void decRpcCount()

incRpcCount

protected void incRpcCount()

timedOut

protected boolean timedOut(long currentTime)

readAndProcess

public int readAndProcess()
                   throws IOException,
                          InterruptedException
Throws:
IOException
InterruptedException

processData

protected void processData(byte[] buf)
                    throws IOException,
                           InterruptedException
Throws:
IOException
InterruptedException

close

protected void close()


Copyright © 2013 The Apache Software Foundation. All Rights Reserved.