Java Code Examples for org.apache.tomcat.jni.Status#APR_STATUS_IS_EINVAL

The following examples show how to use org.apache.tomcat.jni.Status#APR_STATUS_IS_EINVAL . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AprEndpoint.java    From Tomcat8-Source-Read with MIT License 5 votes vote down vote up
/**
 * Allocate a new poller of the specified size.
 * @param size The size
 * @param pool The pool from which the poller will be allocated
 * @param timeout The timeout
 * @return the poller pointer
 */
protected long allocatePoller(int size, long pool, int timeout) {
    try {
        return Poll.create(size, pool, 0, timeout * 1000);
    } catch (Error e) {
        if (Status.APR_STATUS_IS_EINVAL(e.getError())) {
            log.info(sm.getString("endpoint.poll.limitedpollsize", "" + size));
            return 0;
        } else {
            log.error(sm.getString("endpoint.poll.initfail"), e);
            return -1;
        }
    }
}
 
Example 2
Source File: AprEndpoint.java    From Tomcat7.0.67 with Apache License 2.0 5 votes vote down vote up
/**
 * Allocate a new poller of the specified size.
 */
protected long allocatePoller(int size, long pool, int timeout) {
    try {
        return Poll.create(size, pool, 0, timeout * 1000);
    } catch (Error e) {
        if (Status.APR_STATUS_IS_EINVAL(e.getError())) {
            log.info(sm.getString("endpoint.poll.limitedpollsize", "" + size));
            return 0;
        } else {
            log.error(sm.getString("endpoint.poll.initfail"), e);
            return -1;
        }
    }
}
 
Example 3
Source File: AprEndpoint.java    From tomcatsrc with Apache License 2.0 5 votes vote down vote up
/**
 * Allocate a new poller of the specified size.
 */
protected long allocatePoller(int size, long pool, int timeout) {
    try {
        return Poll.create(size, pool, 0, timeout * 1000);
    } catch (Error e) {
        if (Status.APR_STATUS_IS_EINVAL(e.getError())) {
            log.info(sm.getString("endpoint.poll.limitedpollsize", "" + size));
            return 0;
        } else {
            log.error(sm.getString("endpoint.poll.initfail"), e);
            return -1;
        }
    }
}