Java org.apache.commons.pool2.impl AbandonedConfig fields, constructors, methods, implement or subclass

Example usage for Java org.apache.commons.pool2.impl AbandonedConfig fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for org.apache.commons.pool2.impl AbandonedConfig.

The text is from its open source code.

Subclass

org.apache.commons.pool2.impl.AbandonedConfig has subclasses.
Click this link to see all its subclasses.

Constructor

Method

booleangetLogAbandoned()
Flag to log stack traces for application code which abandoned an object.
PrintWritergetLogWriter()
Returns the log writer being used by this configuration to log information on abandoned objects.
booleangetRemoveAbandonedOnBorrow()

Flag to remove abandoned objects if they exceed the removeAbandonedTimeout when borrowObject is invoked.

The default value is false.

If set to true, abandoned objects are removed by borrowObject if there are fewer than 2 idle objects available in the pool and getNumActive() > getMaxTotal() - 3

booleangetRemoveAbandonedOnMaintenance()

Flag to remove abandoned objects if they exceed the removeAbandonedTimeout when pool maintenance (the "evictor") runs.

The default value is false.

If set to true, abandoned objects are removed by the pool maintenance thread when it runs.

intgetRemoveAbandonedTimeout()

Timeout in seconds before an abandoned object can be removed.

The time of most recent use of an object is the maximum (latest) of TrackedUse#getLastUsed() (if this class of the object implements TrackedUse) and the time when the object was borrowed from the pool.

The default value is 300 seconds.

booleangetUseUsageTracking()
If the pool implements UsageTracking , should the pool record a stack trace every time a method is called on a pooled object and retain the most recent stack trace to aid debugging of abandoned objects?
voidsetLogAbandoned(boolean logAbandoned)
Sets the flag to log stack traces for application code which abandoned an object.
voidsetRemoveAbandonedOnBorrow(boolean removeAbandonedOnBorrow)

Flag to remove abandoned objects if they exceed the removeAbandonedTimeout when borrowObject is invoked.

voidsetRemoveAbandonedOnMaintenance(boolean removeAbandonedOnMaintenance)

Flag to remove abandoned objects if they exceed the removeAbandonedTimeout when pool maintenance runs.

voidsetRemoveAbandonedTimeout(int removeAbandonedTimeout)

Sets the timeout in seconds before an abandoned object can be removed

Setting this property has no effect if #getRemoveAbandonedOnBorrow() removeAbandonedOnBorrow and #getRemoveAbandonedOnMaintenance() removeAbandonedOnMaintenance are both false.

voidsetUseUsageTracking(boolean useUsageTracking)
If the pool implements UsageTracking , configure whether the pool should record a stack trace every time a method is called on a pooled object and retain the most recent stack trace to aid debugging of abandoned objects.