java.nio.channels.Selector that uses the BSD (including MacOS)
kqueue(2) mechanism
| Modifier and Type | Class and Description |
|---|---|
| private static class | |
| private static class | |
| private abstract static class | |
| private static class | |
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private final Pointer | |
| private static final boolean | |
| private final Map | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private final Pointer | |
| private static final int | |
| private static final int | |
| private final KQSelector. | |
| private int | |
| private static final int | |
| private final int[] | |
| private final Object | |
| private final Runtime | |
| private final Set | |
| private final Native. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private int | |
| private void | |
| protected void | implCloseSelector()
Implements abstract java. |
| pack-priv void | |
| public Set | |
| private int | |
| protected SelectionKey | register(AbstractSelectableChannel
The channel to be registered ch, int The initial interest set, which must be valid ops, Object The initial attachment for the resulting key att)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. |
| private void |
| changebuf | back to summary |
|---|---|
| private final Pointer changebuf | |
| DEBUG | back to summary |
|---|---|
| private static final boolean DEBUG | |
| descriptors | back to summary |
|---|---|
| private final Map<Integer, KQSelector. | |
| EV_ADD | back to summary |
|---|---|
| private static final int EV_ADD | |
| EV_CLEAR | back to summary |
|---|---|
| private static final int EV_CLEAR | |
| EV_DELETE | back to summary |
|---|---|
| private static final int EV_DELETE | |
| EV_DISABLE | back to summary |
|---|---|
| private static final int EV_DISABLE | |
| EV_ENABLE | back to summary |
|---|---|
| private static final int EV_ENABLE | |
| eventbuf | back to summary |
|---|---|
| private final Pointer eventbuf | |
| EVFILT_READ | back to summary |
|---|---|
| private static final int EVFILT_READ | |
| EVFILT_WRITE | back to summary |
|---|---|
| private static final int EVFILT_WRITE | |
| io | back to summary |
|---|---|
| private final KQSelector. | |
| kqfd | back to summary |
|---|---|
| private int kqfd | |
| MAX_EVENTS | back to summary |
|---|---|
| private static final int MAX_EVENTS | |
| pipefd | back to summary |
|---|---|
| private final int[] pipefd | |
| regLock | back to summary |
|---|---|
| private final Object regLock | |
| runtime | back to summary |
|---|---|
| private final Runtime runtime | |
| selected | back to summary |
|---|---|
| private final Set<SelectionKey> selected | |
| ZERO_TIMESPEC | back to summary |
|---|---|
| private final Native. | |
| KQSelector | back to summary |
|---|---|
| public KQSelector(NativeSelectorProvider provider) | |
| handleCancelledKeys | back to summary |
|---|---|
| private int handleCancelledKeys() | |
| handleChangedKey | back to summary |
|---|---|
| private void handleChangedKey(KQSelector. | |
| implCloseSelector | back to summary |
|---|---|
| protected void implCloseSelector() throws IOException Implements abstract java. Doc from java. Closes this selector. This method is invoked by the An implementation of this method must arrange for any other thread
that is blocked in a selection operation upon this selector to return
immediately as if by invoking the
| |
| interestOps | back to summary |
|---|---|
| pack-priv void interestOps(KQSelectionKey k, int ops) | |
| 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.
| |
| poll | back to summary |
|---|---|
| private int poll(long timeout) | |
| register | back to summary |
|---|---|
| protected SelectionKey register(AbstractSelectableChannel ch, int ops, Object att) Implements abstract java. Doc from java. Registers the given channel with this selector. This method is invoked by a channel's
| |
| 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. | |
| wakeupReceived | back to summary |
|---|---|
| private void wakeupReceived() | |
| Modifier and Type | Field and Description |
|---|---|
| private final int | |
| private final Set | |
| private boolean | |
| private boolean |
| Access | Constructor and Description |
|---|---|
| public |
| fd | back to summary |
|---|---|
| private final int fd | |
| keys | back to summary |
|---|---|
| private final Set<KQSelectionKey> keys | |
| read | back to summary |
|---|---|
| private boolean read | |
| write | back to summary |
|---|---|
| private boolean write | |
| Descriptor | back to summary |
|---|---|
| public Descriptor(int fd) | |
| Modifier and Type | Field and Description |
|---|---|
| private static final KQSelector. | |
| private final KQSelector. | |
| private final Type |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv int | |
| public final int | |
| public static KQSelector. | |
| public final void | |
| public final void | |
| public final void | |
| public final int |
| INSTANCE | back to summary |
|---|---|
| private static final KQSelector. | |
| layout | back to summary |
|---|---|
| private final KQSelector. | |
| uintptr_t | back to summary |
|---|---|
| private final Type uintptr_t | |
| EventIO | back to summary |
|---|---|
| private EventIO() | |
| getFD | back to summary |
|---|---|
| pack-priv int getFD(Pointer ptr, int index) | |
| getFilter | back to summary |
|---|---|
| public final int getFilter(Pointer buf, int index) | |
| getInstance | back to summary |
|---|---|
| public static KQSelector. | |
| put | back to summary |
|---|---|
| public final void put(Pointer buf, int index, int fd, int filt, int flags) | |
| putFilter | back to summary |
|---|---|
| public final void putFilter(Pointer buf, int index, int filter) | |
| putFlags | back to summary |
|---|---|
| public final void putFlags(Pointer buf, int index, int flags) | |
| size | back to summary |
|---|---|
| public final int size() | |
| Modifier and Type | Field and Description |
|---|---|
| public final StructLayout. | |
| public final StructLayout. | |
| public final StructLayout. | |
| public final StructLayout. |
| Access | Constructor and Description |
|---|---|
| private |
| fflags | back to summary |
|---|---|
| public final StructLayout. | |
| filter | back to summary |
|---|---|
| public final StructLayout. | |
| flags | back to summary |
|---|---|
| public final StructLayout. | |
| ident | back to summary |
|---|---|
| public final StructLayout. | |
| EventLayout | back to summary |
|---|---|
| private EventLayout(Runtime runtime) | |
| Modifier and Type | Field and Description |
|---|---|
| public final StructLayout. | |
| public final StructLayout. | |
| public final StructLayout. |
| Access | Constructor and Description |
|---|---|
| private |
| data | back to summary |
|---|---|
| public final StructLayout. | |
| ext | back to summary |
|---|---|
| public final StructLayout. | |
| udata | back to summary |
|---|---|
| public final StructLayout. | |
| FreeBSD12EventLayout | back to summary |
|---|---|
| private FreeBSD12EventLayout(Runtime runtime) | |
| Modifier and Type | Field and Description |
|---|---|
| public final StructLayout. | |
| public final StructLayout. |
| Access | Constructor and Description |
|---|---|
| private |
| data | back to summary |
|---|---|
| public final StructLayout. | |
| udata | back to summary |
|---|---|
| public final StructLayout. | |
| LegacyEventLayout | back to summary |
|---|---|
| private LegacyEventLayout(Runtime runtime) | |