Public Member Functions | |
String | toString () |
Package Functions | |
SelectSetPollImpl () | |
Create a SelectSetPollImpl with no SelectItems. | |
synchronized void | add (SelectItem sel) |
Add a SelectItem to this SelectSetPollImpl. | |
synchronized void | add (SelectItem selarr[]) |
Add all of the SelectItems in the given array to the SelectSetPollImpl. | |
synchronized void | remove (SelectItem sel) |
Remove a SelectItem from the SelectSetPollImpl. | |
synchronized void | remove (SelectItem selarr[]) |
Remove all of the SelectItems in the given array from the SelectSetPollImpl. | |
synchronized void | remove (int index) |
Remove the SelectItem at the given index from the SelectSetPollImpl. | |
void | update () |
Update any changed event masks in the SelectSet. | |
void | update (SelectItem sel) |
Update any changed event masks in this SelectItem. | |
synchronized int | size () |
Return the number of SelectItems in this SelectSetPollImpl. | |
synchronized int | numActive () |
Return the number of active SelectItems in this SelectSetPollImpl. | |
synchronized SelectItem | elementAt (int index) |
Return the SelectItem at the given index. | |
int | select (int timeout) |
Wait for events to occur on the SelectItems in this SelectSetPollImpl. | |
synchronized SelectItem[] | getEvents (short mask) |
Returns an array of SelectItems for which events matching the given event mask have occurred (that is, that the revents field matches the given mask). | |
synchronized SelectItem[] | getEvents () |
Returns an array of SelectItems for which some events have occurred (that is, that the revents field is nonzero). | |
Static Package Functions | |
boolean | isSupported () |
Returns true if poll(2) is supported on this platform. | |
Private Member Functions | |
native int | doSelect (int timeout) |
void | itemarrupdate () |
Private Attributes | |
Vector | vec |
SelectItem | itemarr [] |
boolean | needUpdate = false |
int | cachedActiveCount = -1 |
|
Create a SelectSetPollImpl with no SelectItems.
|
|
Add all of the SelectItems in the given array to the SelectSetPollImpl.
Implements nbio.SelectSetImpl. |
|
Add a SelectItem to this SelectSetPollImpl.
Implements nbio.SelectSetImpl. |
|
|
|
Return the SelectItem at the given index.
Implements nbio.SelectSetImpl. |
|
Returns an array of SelectItems for which some events have occurred (that is, that the revents field is nonzero). This is a convenience method and is not meant to be optimized; since it scans the SelectItem array and creates a new reference array, it imposes higher overhead than the application scanning the SelectItem array directly, using the size() and elementAt() methods. Implements nbio.SelectSetImpl. |
|
Returns an array of SelectItems for which events matching the given event mask have occurred (that is, that the revents field matches the given mask). This is a convenience method and is not meant to be optimized; since it scans the SelectItem array and creates a new reference array, it imposes higher overhead than the application scanning the SelectItem array directly, using the size() and elementAt() methods. Implements nbio.SelectSetImpl. |
|
Returns true if poll(2) is supported on this platform.
|
|
|
|
Return the number of active SelectItems in this SelectSetPollImpl.
Implements nbio.SelectSetImpl. |
|
Remove the SelectItem at the given index from the SelectSetPollImpl.
Implements nbio.SelectSetImpl. |
|
Remove all of the SelectItems in the given array from the SelectSetPollImpl.
Implements nbio.SelectSetImpl. |
|
Remove a SelectItem from the SelectSetPollImpl.
Implements nbio.SelectSetImpl. |
|
Wait for events to occur on the SelectItems in this SelectSetPollImpl. Upon return, the 'revents' field of each SelectItem will be set to the mask of events that occurred. Note that this method does not set revents to 0 when called; after processing an event, it is the application's responsibility to clear the revents field. This is intentional: if the application wishes to delay the processing of an event, it can leave the revents field as-is so that subsequent calls to select will continue to indicate that the event is pending. IMPORTANT NOTE: If timeout is non-zero, this call will block the thread which invokes it. If you are using Green Threads, this will block the entire JVM. Unless you have a single-threaded application, you should only use SelectSet.select() with native threads.
Implements nbio.SelectSetImpl. |
|
Return the number of SelectItems in this SelectSetPollImpl.
Implements nbio.SelectSetImpl. |
|
|
|
Update any changed event masks in this SelectItem. Does nothing in this implementation. Implements nbio.SelectSetImpl. |
|
Update any changed event masks in the SelectSet. Does nothing in this implementation. Implements nbio.SelectSetImpl. |
|
|
|
|
|
|
|
|