Class ConnectionPool.PoolCleaner
java.lang.Object
java.util.TimerTask
org.apache.tomcat.jdbc.pool.ConnectionPool.PoolCleaner
- All Implemented Interfaces:
Runnable
- Enclosing class:
ConnectionPool
A scheduled task that periodically checks for abandoned connections,
validates idle connections, and resizes the idle pool according to
the pool's configuration.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected WeakReference<ConnectionPool> Weak reference to the connection pool being monitored.protected longSleep interval in milliseconds between cleaner runs. -
Method Summary
Methods inherited from class TimerTask
cancel, scheduledExecutionTime
-
Field Details
-
pool
Weak reference to the connection pool being monitored. -
sleepTime
protected long sleepTimeSleep interval in milliseconds between cleaner runs.
-
-
Method Details
-
run
-
start
public void start()Starts the pool cleaner by registering it with the shared timer. -
stopRunning
public void stopRunning()Stops the pool cleaner by unregistering it from the shared timer.
-