Thread.State, Thread.UncaughtExceptionHandler
Modifier and Type | Field and Description |
---|---|
private Selector |
writeSelector |
private Set<RpcServer.Connection> |
writingCons |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
Constructor and Description |
---|
RpcServer.Responder() |
Modifier and Type | Method and Description |
---|---|
private void |
doAsyncWrite(SelectionKey key) |
(package private) void |
doRespond(RpcServer.Call call) |
private void |
doRunLoop() |
private boolean |
processAllResponses(RpcServer.Connection connection)
Process all the responses for this connection
|
private boolean |
processResponse(RpcServer.Call call)
Process the response for this call.
|
private long |
purge(long lastPurgeTime)
If there were some calls that have not been sent out for a
long time, we close the connection.
|
void |
registerForWrite(RpcServer.Connection c)
Add a connection to the list that want to write,
|
private void |
registerWrites()
Take the list of the connections that want to write, and register them
in the selector.
|
void |
run() |
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
private final Selector writeSelector
private final Set<RpcServer.Connection> writingCons
RpcServer.Responder() throws IOException
IOException
private void registerWrites()
public void registerForWrite(RpcServer.Connection c)
private void doRunLoop()
private long purge(long lastPurgeTime)
private void doAsyncWrite(SelectionKey key) throws IOException
IOException
private boolean processResponse(RpcServer.Call call) throws IOException
RpcServer.Connection.responseWriteLock
call
- the callIOException
private boolean processAllResponses(RpcServer.Connection connection) throws IOException
IOException
void doRespond(RpcServer.Call call) throws IOException
IOException
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.