MCPcopy Index your code
hub / github.com/apache/tomcat / threadStart

Method threadStart

java/org/apache/catalina/core/ContainerBase.java:1078–1094  ·  view source on GitHub ↗

Start the background thread that will periodically check for session timeouts.

()

Source from the content-addressed store, hash-verified

1076 * Start the background thread that will periodically check for session timeouts.
1077 */
1078 protected void threadStart() {
1079 if (backgroundProcessorDelay > 0 &&
1080 (getState().isAvailable() || LifecycleState.STARTING_PREP.equals(getState())) &&
1081 (backgroundProcessorFuture == null || backgroundProcessorFuture.isDone())) {
1082 if (backgroundProcessorFuture != null && backgroundProcessorFuture.isDone()) {
1083 // There was an error executing the scheduled task, get it and log it
1084 try {
1085 backgroundProcessorFuture.get();
1086 } catch (InterruptedException | ExecutionException e) {
1087 log.error(sm.getString("containerBase.backgroundProcess.error"), e);
1088 }
1089 }
1090 backgroundProcessorFuture = Container.getService(this).getServer().getUtilityExecutor()
1091 .scheduleWithFixedDelay(new ContainerBackgroundProcessor(), backgroundProcessorDelay,
1092 backgroundProcessorDelay, TimeUnit.SECONDS);
1093 }
1094 }
1095
1096
1097 /**

Callers 2

runMethod · 0.80
startInternalMethod · 0.80

Calls 11

getServiceMethod · 0.95
isAvailableMethod · 0.65
getStateMethod · 0.65
equalsMethod · 0.65
getMethod · 0.65
errorMethod · 0.65
getStringMethod · 0.65
getUtilityExecutorMethod · 0.65
getServerMethod · 0.65
isDoneMethod · 0.45

Tested by

no test coverage detected