|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.tomcat.jni.Poll
public class Poll
Poll
| Field Summary | |
|---|---|
static int |
APR_NO_DESC
Used in apr_pollfd_t to determine what the apr_descriptor is apr_datatype_e enum |
static int |
APR_POLL_FILE
descriptor refers to a socket |
static int |
APR_POLL_LASTDESC
descriptor refers to a file |
static int |
APR_POLL_SOCKET
nothing here |
static int |
APR_POLLERR
Can write without blocking |
static int |
APR_POLLHUP
Pending error |
static int |
APR_POLLIN
Poll options |
static int |
APR_POLLNVAL
Hangup occurred |
static int |
APR_POLLOUT
Priority data available |
static int |
APR_POLLPRI
Can read without blocking |
static int |
APR_POLLSET_THREADSAFE
Adding or Removing a Descriptor is thread safe |
| Constructor Summary | |
|---|---|
Poll()
|
|
| Method Summary | |
|---|---|
static int |
add(long pollset,
long sock,
int reqevents)
Add a socket or to a pollset If you set client_data in the descriptor, that value will be returned in the client_data field whenever this descriptor is signalled in apr_pollset_poll(). |
static long |
create(int size,
long p,
int flags,
long ttl)
Setup a pollset object. |
static int |
destroy(long pollset)
Destroy a pollset object |
static long |
getTtl(long pollset)
Get the socket time to live. |
static int |
maintain(long pollset,
long[] descriptors,
boolean remove)
Maintain on the descriptor(s) in a pollset |
static int |
poll(long pollset,
long timeout,
long[] descriptors,
boolean remove)
Block for activity on the descriptor(s) in a pollset |
static int |
pollset(long pollset,
long[] descriptors)
Return all descriptor(s) in a pollset |
static int |
remove(long pollset,
long sock)
Remove a descriptor from a pollset |
static void |
setTtl(long pollset,
long ttl)
Set the socket time to live. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int APR_POLLIN
public static final int APR_POLLPRI
public static final int APR_POLLOUT
public static final int APR_POLLERR
public static final int APR_POLLHUP
public static final int APR_POLLNVAL
public static final int APR_POLLSET_THREADSAFE
public static final int APR_NO_DESC
public static final int APR_POLL_SOCKET
public static final int APR_POLL_FILE
public static final int APR_POLL_LASTDESC
| Constructor Detail |
|---|
public Poll()
| Method Detail |
|---|
public static long create(int size,
long p,
int flags,
long ttl)
throws Error
size - The maximum number of descriptors that this pollset can holdp - The pool from which to allocate the pollsetflags - Optional flags to modify the operation of the pollset.ttl - Maximum time to live for a particular socket.
Errorpublic static int destroy(long pollset)
pollset - The pollset to destroy
public static int add(long pollset,
long sock,
int reqevents)
pollset - The pollset to which to add the descriptorsock - The sockets to adddata - Client data to addreqevents - requested events
public static int remove(long pollset,
long sock)
pollset - The pollset from which to remove the descriptorsock - The socket to remove
public static int poll(long pollset,
long timeout,
long[] descriptors,
boolean remove)
pollset - The pollset to usetimeout - Timeout in microsecondsdescriptors - Array of signalled descriptors (output parameter)
The desctiptor array must be two times the size of pollset.
and are populated as follows:
descriptors[n + 0] -> returned events descriptors[n + 1] -> socket
remove - Remove signaled descriptors from pollset
public static int maintain(long pollset,
long[] descriptors,
boolean remove)
pollset - The pollset to usedescriptors - Array of signalled descriptors (output parameter)
The desctiptor array must be the size of pollset.
and are populated as follows:
descriptors[n] -> socket
remove - Remove signaled descriptors from pollset
public static void setTtl(long pollset,
long ttl)
pollset - The pollset to usettl - Timeout in microsecondspublic static long getTtl(long pollset)
pollset - The pollset to use
public static int pollset(long pollset,
long[] descriptors)
pollset - The pollset to usedescriptors - Array of descriptors (output parameter)
The desctiptor array must be two times the size of pollset.
and are populated as follows:
descriptors[n + 0] -> returned events descriptors[n + 1] -> socket
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||