Java Code Examples for org.apache.tomcat.jni.Poll#remove()
The following examples show how to use
org.apache.tomcat.jni.Poll#remove() .
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 | 6 votes |
/** * Remove specified socket from the pollers. Must only be called from * {@link Poller#run()}. */ private void removeFromPoller(long socket) { if (log.isDebugEnabled()) { log.debug(sm.getString("endpoint.debug.pollerRemove", Long.valueOf(socket))); } int rv = -1; for (int i = 0; i < pollers.length; i++) { if (pollerSpace[i] < actualPollerSize) { rv = Poll.remove(pollers[i], socket); if (rv != Status.APR_NOTFOUND) { pollerSpace[i]++; connectionCount.decrementAndGet(); if (log.isDebugEnabled()) { log.debug(sm.getString("endpoint.debug.pollerRemoved", Long.valueOf(socket))); } break; } } } timeouts.remove(socket); }
Example 2
Source File: AprEndpoint.java From Tomcat7.0.67 with Apache License 2.0 | 6 votes |
/** * Remove specified socket from the pollers. Must only be called from * {@link Poller#run()}. */ private boolean removeFromPoller(long socket) { if (log.isDebugEnabled()) { log.debug(sm.getString("endpoint.debug.pollerRemove", Long.valueOf(socket))); } int rv = -1; for (int i = 0; i < pollers.length; i++) { if (pollerSpace[i] < actualPollerSize) { rv = Poll.remove(pollers[i], socket); if (rv != Status.APR_NOTFOUND) { pollerSpace[i]++; connectionCount.decrementAndGet(); if (log.isDebugEnabled()) { log.debug(sm.getString("endpoint.debug.pollerRemoved", Long.valueOf(socket))); } break; } } } timeouts.remove(socket); return (rv == Status.APR_SUCCESS); }
Example 3
Source File: AprEndpoint.java From tomcatsrc with Apache License 2.0 | 6 votes |
/** * Remove specified socket from the pollers. Must only be called from * {@link Poller#run()}. */ private boolean removeFromPoller(long socket) { if (log.isDebugEnabled()) { log.debug(sm.getString("endpoint.debug.pollerRemove", Long.valueOf(socket))); } int rv = -1; for (int i = 0; i < pollers.length; i++) { if (pollerSpace[i] < actualPollerSize) { rv = Poll.remove(pollers[i], socket); if (rv != Status.APR_NOTFOUND) { pollerSpace[i]++; connectionCount.decrementAndGet(); if (log.isDebugEnabled()) { log.debug(sm.getString("endpoint.debug.pollerRemoved", Long.valueOf(socket))); } break; } } } timeouts.remove(socket); return (rv == Status.APR_SUCCESS); }
Example 4
Source File: AprEndpoint.java From Tomcat8-Source-Read with MIT License | 5 votes |
/** * Remove socket from the poller. * * @param data the sendfile data which should be removed */ protected void remove(SendfileData data) { int rv = Poll.remove(sendfilePollset, data.socket); if (rv == Status.APR_SUCCESS) { sendfileCount--; } sendfileData.remove(Long.valueOf(data.socket)); }
Example 5
Source File: AprEndpoint.java From Tomcat7.0.67 with Apache License 2.0 | 5 votes |
/** * Remove socket from the poller. * * @param data the sendfile data which should be removed */ protected void remove(SendfileData data) { int rv = Poll.remove(sendfilePollset, data.socket); if (rv == Status.APR_SUCCESS) { sendfileCount--; } sendfileData.remove(Long.valueOf(data.socket)); }
Example 6
Source File: AprEndpoint.java From tomcatsrc with Apache License 2.0 | 5 votes |
/** * Remove socket from the poller. * * @param data the sendfile data which should be removed */ protected void remove(SendfileData data) { int rv = Poll.remove(sendfilePollset, data.socket); if (rv == Status.APR_SUCCESS) { sendfileCount--; } sendfileData.remove(Long.valueOf(data.socket)); }