| Modifier and Type | Field and Description |
|---|---|
| private final Selector | |
| private final SelectedSelectionKeySet |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void | close()
Implements abstract java. Implements java. |
| public boolean | isOpen()
Implements abstract java. |
| public Set | |
| public SelectorProvider | provider()
Implements abstract java. |
| public int | select(long
If positive, block for up to timeout)timeout
milliseconds, more or less, while waiting for a
channel to become ready; if zero, block indefinitely;
must not be negativeImplements abstract java. |
| public int | select()
Implements abstract java. |
| public Set | selectedKeys()
Implements abstract java. |
| public int | selectNow()
Implements abstract java. |
| public Selector | wakeup()
Implements abstract java. |
| delegate | back to summary |
|---|---|
| private final Selector delegate | |
| selectionKeys | back to summary |
|---|---|
| private final SelectedSelectionKeySet selectionKeys | |
| SelectedSelectionKeySetSelector | back to summary |
|---|---|
| pack-priv SelectedSelectionKeySetSelector(Selector delegate, SelectedSelectionKeySet selectionKeys) | |
| close | back to summary |
|---|---|
| public void close() throws IOException Implements abstract java. Implements java. Doc from java. Closes this selector. If a thread is currently blocked in one of this selector's selection
methods then it is interrupted as if by invoking the selector's Any uncancelled keys still associated with this selector are invalidated, their channels are deregistered, and any other resources associated with this selector are released. If this selector is already closed then invoking this method has no effect. After a selector is closed, any further attempt to use it, except by
invoking this method or the
| |
| isOpen | back to summary |
|---|---|
| public boolean isOpen() Implements abstract java. Doc from java. Tells whether or not this selector is open.
| |
| keys | back to summary |
|---|---|
| public Set Implements abstract java. Doc from java. Returns this selector's key set. The key set is not directly modifiable. A key is removed only after
it has been cancelled and its channel has been deregistered. Any
attempt to modify the key set will cause an The set is safe for use by multiple concurrent threads.
| |
| provider | back to summary |
|---|---|
| public SelectorProvider provider() Implements abstract java. Doc from java. Returns the provider that created this channel.
| |
| select | back to summary |
|---|---|
| public int select(long timeout) throws IOException Implements abstract java. Doc from java. Selects a set of keys whose corresponding channels are ready for I/O operations. This method performs a blocking selection
operation. It returns only after at least one channel is selected,
this selector's This method does not offer real-time guarantees: It schedules the
timeout as if by invoking the
| |
| select | back to summary |
|---|---|
| public int select() throws IOException Implements abstract java. Doc from java. Selects a set of keys whose corresponding channels are ready for I/O operations. This method performs a blocking selection
operation. It returns only after at least one channel is selected,
this selector's
| |
| selectedKeys | back to summary |
|---|---|
| public Set Implements abstract java. Doc from java. Returns this selector's selected-key set. Keys may be removed from, but not directly added to, the
selected-key set. Any attempt to add an object to the key set will
cause an The selected-key set is not thread-safe.
| |
| selectNow | back to summary |
|---|---|
| public int selectNow() throws IOException Implements abstract java. Doc from java. Selects a set of keys whose corresponding channels are ready for I/O operations. This method performs a non-blocking selection operation. If no channels have become selectable since the previous selection operation then this method immediately returns zero. Invoking this method clears the effect of any previous invocations
of the
| |
| wakeup | back to summary |
|---|---|
| public Selector wakeup() Implements abstract java. Doc from java. Causes the first selection operation that has not yet returned to return immediately. If another thread is currently blocked in a selection operation then
that invocation will return immediately. If no selection operation is
currently in progress then the next invocation of a selection operation
will return immediately unless Invoking this method more than once between two successive selection operations has the same effect as invoking it just once. | |