Class BaseGenericObjectPool.Evictor
java.lang.Object
org.datanucleus.store.rdbms.datasource.dbcp2.pool2.impl.BaseGenericObjectPool.Evictor
- All Implemented Interfaces:
Runnable
- Enclosing class:
BaseGenericObjectPool<T>
The idle object evictor
TimerTask
.- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) void
cancel()
Cancels the scheduled future.void
run()
Run pool maintenance.(package private) void
setScheduledFuture
(ScheduledFuture<?> scheduledFuture) Sets the scheduled future.
-
Field Details
-
scheduledFuture
-
-
Constructor Details
-
Evictor
Evictor()
-
-
Method Details
-
run
public void run()Run pool maintenance. Evict objects qualifying for eviction and then ensure that the minimum number of idle instances are available. Since the Timer that invokes Evictors is shared for all Pools but pools may exist in different class loaders, the Evictor ensures that any actions taken are under the class loader of the factory associated with the pool. -
setScheduledFuture
Sets the scheduled future.- Parameters:
scheduledFuture
- the scheduled future.
-
cancel
void cancel()Cancels the scheduled future.
-