| java.lang.Object org.apache.tomcat.jni.Poll
Poll | public class Poll (Code) | | Poll
author: Mladen Turk version: $Revision: 467222 $, $Date: 2006-10-24 05:17:11 +0200 (mar., 24 oct. 2006) $ |
Method Summary | |
native public 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(). | native public static long | create(int size, long p, int flags, long ttl) Setup a pollset object.
If flags equals APR_POLLSET_THREADSAFE, then a pollset is
created on which it is safe to make concurrent calls to
apr_pollset_add(), apr_pollset_remove() and apr_pollset_poll() from
separate threads. | native public static int | destroy(long pollset) | native public static long | getTtl(long pollset) Get the socket time to live. | native public static int | maintain(long pollset, long[] descriptors, boolean remove) | native public static int | poll(long pollset, long timeout, long[] descriptors, boolean remove) | native public static int | pollset(long pollset, long[] descriptors) | native public static int | remove(long pollset, long sock) | native public static void | setTtl(long pollset, long ttl) Set the socket time to live. |
APR_NO_DESC | final public static int APR_NO_DESC(Code) | | Used in apr_pollfd_t to determine what the apr_descriptor is
apr_datatype_e enum
|
APR_POLLERR | final public static int APR_POLLERR(Code) | | Can write without blocking
|
APR_POLLHUP | final public static int APR_POLLHUP(Code) | | Pending error
|
APR_POLLIN | final public static int APR_POLLIN(Code) | | Poll options
|
APR_POLLNVAL | final public static int APR_POLLNVAL(Code) | | Hangup occurred
|
APR_POLLOUT | final public static int APR_POLLOUT(Code) | | Priority data available
|
APR_POLLPRI | final public static int APR_POLLPRI(Code) | | Can read without blocking
|
APR_POLLSET_THREADSAFE | final public static int APR_POLLSET_THREADSAFE(Code) | | Adding or Removing a Descriptor is thread safe
|
APR_POLL_FILE | final public static int APR_POLL_FILE(Code) | | descriptor refers to a socket
|
APR_POLL_LASTDESC | final public static int APR_POLL_LASTDESC(Code) | | descriptor refers to a file
|
APR_POLL_SOCKET | final public static int APR_POLL_SOCKET(Code) | | nothing here
|
add | native public static int add(long pollset, long sock, int reqevents)(Code) | | 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().
Parameters: pollset - The pollset to which to add the descriptor Parameters: sock - The sockets to add Parameters: data - Client data to add Parameters: reqevents - requested events |
create | native public static long create(int size, long p, int flags, long ttl) throws Error(Code) | | Setup a pollset object.
If flags equals APR_POLLSET_THREADSAFE, then a pollset is
created on which it is safe to make concurrent calls to
apr_pollset_add(), apr_pollset_remove() and apr_pollset_poll() from
separate threads. This feature is only supported on some
platforms; the apr_pollset_create() call will fail with
APR_ENOTIMPL on platforms where it is not supported.
Parameters: size - The maximum number of descriptors that this pollset can hold Parameters: p - The pool from which to allocate the pollset Parameters: flags - Optional flags to modify the operation of the pollset. Parameters: ttl - Maximum time to live for a particular socket. The pointer in which to return the newly created object |
destroy | native public static int destroy(long pollset)(Code) | | Destroy a pollset object
Parameters: pollset - The pollset to destroy |
getTtl | native public static long getTtl(long pollset)(Code) | | Get the socket time to live.
Parameters: pollset - The pollset to use Timeout in microseconds |
maintain | native public static int maintain(long pollset, long[] descriptors, boolean remove)(Code) | | Maintain on the descriptor(s) in a pollset
Parameters: pollset - The pollset to use Parameters: descriptors - Array of signalled descriptors (output parameter)The desctiptor array must be the size of pollset.and are populated as follows:descriptors[n] -> socket Parameters: remove - Remove signaled descriptors from pollset Number of signalled descriptors (output parameter)or negative APR error code. |
poll | native public static int poll(long pollset, long timeout, long[] descriptors, boolean remove)(Code) | | Block for activity on the descriptor(s) in a pollset
Parameters: pollset - The pollset to use Parameters: timeout - Timeout in microseconds Parameters: descriptors - 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 eventsdescriptors[n + 1] -> socket Parameters: remove - Remove signaled descriptors from pollset Number of signalled descriptors (output parameter)or negative APR error code. |
pollset | native public static int pollset(long pollset, long[] descriptors)(Code) | | Return all descriptor(s) in a pollset
Parameters: pollset - The pollset to use Parameters: descriptors - 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 eventsdescriptors[n + 1] -> socket Number of descriptors (output parameter) in the Pollor negative APR error code. |
remove | native public static int remove(long pollset, long sock)(Code) | | Remove a descriptor from a pollset
Parameters: pollset - The pollset from which to remove the descriptor Parameters: sock - The socket to remove |
setTtl | native public static void setTtl(long pollset, long ttl)(Code) | | Set the socket time to live.
Parameters: pollset - The pollset to use Parameters: ttl - Timeout in microseconds |
|
|