protected class HBaseClient.Connection extends Thread
Modifier and Type | Class and Description |
---|---|
protected class |
HBaseClient.Connection.PingInputStream
This class sends a ping to the remote side when timeout on
reading.
|
Thread.State, Thread.UncaughtExceptionHandler
Modifier and Type | Field and Description |
---|---|
protected ConcurrentSkipListMap<Integer,HBaseClient.Call> |
calls |
protected IOException |
closeException |
protected DataInputStream |
in |
protected AtomicLong |
lastActivity |
protected DataOutputStream |
out |
protected HBaseClient.ConnectionId |
remoteId |
protected AtomicBoolean |
shouldCloseConnection |
protected Socket |
socket |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
Modifier and Type | Method and Description |
---|---|
protected void |
addCall(HBaseClient.Call call)
Add a call to this connection's call queue and notify
a listener; synchronized.
|
protected void |
cleanupCalls() |
protected void |
cleanupCalls(long rpcTimeout) |
protected void |
close()
Close the connection.
|
protected void |
closeConnection() |
InetSocketAddress |
getRemoteAddress() |
protected void |
markClosed(IOException e) |
protected void |
receiveResponse() |
void |
run() |
protected void |
sendParam(HBaseClient.Call call) |
protected void |
sendPing() |
protected void |
setupConnection() |
protected void |
setupIOstreams()
Connect to the server and set up the I/O streams.
|
protected void |
touch()
Update lastActivity with the current time.
|
protected boolean |
waitForWork() |
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
protected HBaseClient.ConnectionId remoteId
protected Socket socket
protected DataInputStream in
protected DataOutputStream out
protected final ConcurrentSkipListMap<Integer,HBaseClient.Call> calls
protected final AtomicLong lastActivity
protected final AtomicBoolean shouldCloseConnection
protected IOException closeException
protected void touch()
protected void addCall(HBaseClient.Call call)
call
- to addprotected void setupConnection() throws IOException
IOException
protected void setupIOstreams() throws IOException, InterruptedException
IOException
- eInterruptedException
protected void closeConnection()
protected boolean waitForWork()
public InetSocketAddress getRemoteAddress()
protected void sendPing() throws IOException
IOException
protected void sendParam(HBaseClient.Call call)
protected void receiveResponse()
protected void markClosed(IOException e)
protected void close()
protected void cleanupCalls()
protected void cleanupCalls(long rpcTimeout)
Copyright © 2014 The Apache Software Foundation. All Rights Reserved.