SelectorManager.
| Modifier and Type | Class and Description |
|---|---|
| public class |
| Modifier and Type | Field and Description |
|---|---|
| protected Connection | |
| protected boolean | |
| protected int | |
| protected SelectionKey | |
| protected SelectorManager | |
| protected boolean | |
| protected SelectorManager. | |
| private Timeout. | |
| protected boolean | |
| protected boolean |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | blockReadable(long timeoutMs)
Overrides org. Implements org. |
| public boolean | blockWritable(long timeoutMs)
Overrides org. Implements org. |
| public void | |
| public void | close()
Overrides org. Implements org. |
| pack-priv void | |
| public boolean | Returns: True if the endpoint should be dispatched to a thread pool.If true, the interested ops are not modified. assumeShortDispatch)Put the endpoint into the dispatched state. |
| pack-priv void | |
| public int | flush(Buffer
A buffer to write before flushing this buffer. This buffers getIndex is updated. header, Buffer The buffer to flush. This buffers getIndex is updated. buffer, Buffer A buffer to write after flushing this buffer. This buffers getIndex is updated. trailer)Overrides org. Implements org. |
| public int | flush(Buffer
The buffer to flush. This buffers getIndex is updated. buffer)Overrides org. Implements org. |
| public Connection | |
| public SelectorManager. | |
| public Timeout. | |
| protected void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public String | |
| public void | |
| private void |
| _connection | back to summary |
|---|---|
| protected Connection _connection | |
| _dispatched | back to summary |
|---|---|
| protected boolean _dispatched | |
| _interestOps | back to summary |
|---|---|
| protected int _interestOps | |
| _key | back to summary |
|---|---|
| protected SelectionKey _key | |
| _manager | back to summary |
|---|---|
| protected SelectorManager _manager | |
| _readBlocked | back to summary |
|---|---|
| protected boolean _readBlocked | |
| _selectSet | back to summary |
|---|---|
| protected SelectorManager. | |
| _timeoutTask | back to summary |
|---|---|
| private Timeout. | |
| _writable | back to summary |
|---|---|
| protected boolean _writable | |
| _writeBlocked | back to summary |
|---|---|
| protected boolean _writeBlocked | |
| SelectChannelEndPoint | back to summary |
|---|---|
| public SelectChannelEndPoint(SocketChannel channel, SelectorManager. | |
| blockReadable | back to summary |
|---|---|
| public boolean blockReadable(long timeoutMs) throws IOException Overrides org. Implements org. | |
| blockWritable | back to summary |
|---|---|
| public boolean blockWritable(long timeoutMs) throws IOException Overrides org. Implements org. | |
| cancelIdle | back to summary |
|---|---|
| public void cancelIdle() | |
| close | back to summary |
|---|---|
| public void close() throws IOException Overrides org. Implements org. Doc from org. Close any backing stream associated with the buffer | |
| dispatch | back to summary |
|---|---|
| pack-priv void dispatch() throws IOException | |
| dispatch | back to summary |
|---|---|
| public boolean dispatch(boolean assumeShortDispatch) throws IOException Put the endpoint into the dispatched state. A blocked thread may be woken up by this call, or the endpoint placed in a state ready for a dispatch to a threadpool.
| |
| doUpdateKey | back to summary |
|---|---|
| pack-priv void doUpdateKey() Synchronize the interestOps with the actual key. Call is scheduled by a call to updateKey | |
| flush | back to summary |
|---|---|
| public int flush(Buffer header, Buffer buffer, Buffer trailer) throws IOException Overrides org. Implements org. Doc from org. Flush the buffer from the current getIndex to it's putIndex using whatever byte sink is backing the buffer. The getIndex is updated with the number of bytes flushed. Any mark set is cleared. If the entire contents of the buffer are flushed, then an implicit empty() is done. The passed header/trailer buffers are written before/after the contents of this buffer. This may be done either as gather writes, as a poke into this buffer or as several writes. The implementation is free to select the optimal mechanism.
| |
| flush | back to summary |
|---|---|
| public int flush(Buffer buffer) throws IOException Overrides org. Implements org. Doc from org. Flush the buffer from the current getIndex to it's putIndex using whatever byte sink is backing the buffer. The getIndex is updated with the number of bytes flushed. Any mark set is cleared. If the entire contents of the buffer are flushed, then an implicit empty() is done.
| |
| getConnection | back to summary |
|---|---|
| public Connection getConnection() | |
| getSelectSet | back to summary |
|---|---|
| public SelectorManager. | |
| getTimeoutTask | back to summary |
|---|---|
| public Timeout. | |
| idleExpired | back to summary |
|---|---|
| protected void idleExpired() | |
| run | back to summary |
|---|---|
| public void run() Implements java. Doc from java. Runs this operation. | |
| scheduleIdle | back to summary |
|---|---|
| public void scheduleIdle() | |
| scheduleWrite | back to summary |
|---|---|
| public void scheduleWrite() | |
| setWritable | back to summary |
|---|---|
| public void setWritable(boolean writable) | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
| |
| undispatch | back to summary |
|---|---|
| public void undispatch() Called when a dispatched thread is no longer handling the endpoint. The selection key operations are updated. | |
| updateKey | back to summary |
|---|---|
| private void updateKey() Updates selection key. Adds operations types to the selection key as needed. No operations are removed as this is only done during dispatch. This method records the new key and schedules a call to doUpdateKey to do the keyChange | |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public String |
| IdleTask | back to summary |
|---|---|
| public IdleTask() | |
| expired | back to summary |
|---|---|
| public void expired() Overrides org. Doc from org. Expire task. This method is called when the timeout expires. It is called outside of any synchronization scope and may be delayed. | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
| |