MCPcopy Create free account
hub / github.com/apache/tomcat / stopMillis

Method stopMillis

java/org/apache/tomcat/util/net/Acceptor.java:188–199  ·  view source on GitHub ↗

Stops the acceptor, optionally waiting for it to finish. @param waitMilliseconds The number of milliseconds to wait for the acceptor to stop

(int waitMilliseconds)

Source from the content-addressed store, hash-verified

186 * @param waitMilliseconds The number of milliseconds to wait for the acceptor to stop
187 */
188 public void stopMillis(int waitMilliseconds) {
189 stopCalled = true;
190 if (waitMilliseconds > 0) {
191 try {
192 if (!stopLatch.await(waitMilliseconds, TimeUnit.MILLISECONDS)) {
193 log.warn(sm.getString("acceptor.stop.fail", getThreadName()));
194 }
195 } catch (InterruptedException e) {
196 log.warn(sm.getString("acceptor.stop.interrupted", getThreadName()), e);
197 }
198 }
199 }
200
201
202 /**

Callers 2

stopInternalMethod · 0.45

Calls 4

getThreadNameMethod · 0.95
awaitMethod · 0.65
warnMethod · 0.65
getStringMethod · 0.65

Tested by

no test coverage detected