1 17 18 package org.apache.tomcat.jni; 19 20 25 26 public class Poll { 27 28 31 public static final int APR_POLLIN = 0x001; 32 public static final int APR_POLLPRI = 0x002; 33 public static final int APR_POLLOUT = 0x004; 34 public static final int APR_POLLERR = 0x010; 35 public static final int APR_POLLHUP = 0x020; 36 public static final int APR_POLLNVAL = 0x040; 37 38 41 42 public static final int APR_POLLSET_THREADSAFE = 0x001; 43 44 45 48 public static final int APR_NO_DESC = 0; 49 public static final int APR_POLL_SOCKET = 1; 50 public static final int APR_POLL_FILE = 2; 51 public static final int APR_POLL_LASTDESC = 3; 52 53 67 public static native long create(int size, long p, int flags, long ttl) 68 throws Error ; 69 73 public static native int destroy(long pollset); 74 75 85 public static native int add(long pollset, long sock, 86 int reqevents); 87 88 93 public static native int remove(long pollset, long sock); 94 95 110 public static native int poll(long pollset, long timeout, 111 long [] descriptors, boolean remove); 112 113 126 public static native int maintain(long pollset, long [] descriptors, 127 boolean remove); 128 129 134 public static native void setTtl(long pollset, long ttl); 135 136 141 public static native long getTtl(long pollset); 142 143 156 public static native int pollset(long pollset, long [] descriptors); 157 158 } 159 | Popular Tags |