| Modifier and Type | Field and Description |
|---|---|
| private static final Duration | DEFAULT_REMOVE_ABANDONED_TIMEOUT_DURATION
The 5 minutes Duration. |
| private boolean | logAbandoned
Determines whether or not to log stack traces for application code which abandoned an object. |
| private PrintWriter | logWriter
PrintWriter to use to log information on abandoned objects. |
| private boolean | removeAbandonedOnBorrow
Whether or not borrowObject performs abandoned object removal. |
| private boolean | removeAbandonedOnMaintenance
Whether or not pool maintenance (evictor) performs abandoned object removal. |
| private Duration | removeAbandonedTimeoutDuration
Timeout before an abandoned object can be removed. |
| private boolean | requireFullStackTrace
Determines whether or not to log full stack traces when logAbandoned is true. |
| private boolean | useUsageTracking
If the pool implements |
| Access | Constructor and Description |
|---|---|
| public | |
| private | AbandonedConfig(final AbandonedConfig
the source. abandonedConfig)Creates a new instance with values from the given instance. |
| Modifier and Type | Method and Description |
|---|---|
| public static AbandonedConfig | Returns: A new instance or null if the input is null.the source, may be null. abandonedConfig)Creates a new instance with values from the given instance. |
| public boolean | Returns: boolean true if stack trace logging is turned on for abandoned objectsFlag to log stack traces for application code which abandoned an object. |
| public PrintWriter | Returns: log writer in useGets the log writer being used by this configuration to log information on abandoned objects. |
| public boolean | Returns: true if abandoned objects are to be removed by borrowObjectFlag to remove abandoned objects if they exceed the removeAbandonedTimeout when borrowObject is invoked. |
| public boolean | Returns: true if abandoned objects are to be removed by the evictorFlag to remove abandoned objects if they exceed the removeAbandonedTimeout when pool maintenance (the "evictor") runs. |
| public int | Returns: the abandoned object timeout in seconds.
Deprecated
Use
getRemoveAbandonedTimeoutDuration().
Timeout in seconds before an abandoned object can be removed. |
| public Duration | Returns: the abandoned object timeout.Timeout before an abandoned object can be removed. |
| public boolean | Returns: true if full stack traces are required for logging abandoned connections, or false if abbreviated stack traces are acceptableIndicates if full stack traces are required when |
| public boolean | Returns: true if usage tracking is enabledIf the pool implements |
| public void | setLogAbandoned(final boolean
true turns on abandoned stack trace logging logAbandoned)Sets the flag to log stack traces for application code which abandoned an object. |
| public void | setLogWriter(final PrintWriter
The new log writer logWriter)Sets the log writer to be used by this configuration to log information on abandoned objects. |
| public void | setRemoveAbandonedOnBorrow(final boolean
true means abandoned objects will be
removed by borrowObject removeAbandonedOnBorrow)Flag to remove abandoned objects if they exceed the removeAbandonedTimeout when borrowObject is invoked. |
| public void | setRemoveAbandonedOnMaintenance(final boolean
true means abandoned objects will be
removed by pool maintenance removeAbandonedOnMaintenance)Flag to remove abandoned objects if they exceed the removeAbandonedTimeout when pool maintenance runs. |
| public void | setRemoveAbandonedTimeout(final Duration
new abandoned timeout removeAbandonedTimeout)Sets the timeout before an abandoned object can be removed. |
| public void | setRemoveAbandonedTimeout(final int
new abandoned timeout in seconds removeAbandonedTimeoutSeconds)
Deprecated
Use
Sets the timeout in seconds before an abandoned object can be
removed.
setRemoveAbandonedTimeout(Duration).
|
| public void | setRequireFullStackTrace(final boolean
indicates whether or not full stack traces are required in
abandoned connection logs requireFullStackTrace)Sets the flag to require full stack traces for logging abandoned connections when enabled. |
| public void | setUseUsageTracking(final boolean
A value of useUsageTracking)true will enable
the recording of a stack trace on every use
of a pooled objectIf the pool implements |
| public String |
| DEFAULT_REMOVE_ABANDONED_TIMEOUT_DURATION | back to summary |
|---|---|
| private static final Duration DEFAULT_REMOVE_ABANDONED_TIMEOUT_DURATION The 5 minutes Duration. | |
| logAbandoned | back to summary |
|---|---|
| private boolean logAbandoned Determines whether or not to log stack traces for application code which abandoned an object. | |
| logWriter | back to summary |
|---|---|
| private PrintWriter logWriter PrintWriter to use to log information on abandoned objects. Use of default system encoding is deliberate. | |
| removeAbandonedOnBorrow | back to summary |
|---|---|
| private boolean removeAbandonedOnBorrow Whether or not borrowObject performs abandoned object removal. | |
| removeAbandonedOnMaintenance | back to summary |
|---|---|
| private boolean removeAbandonedOnMaintenance Whether or not pool maintenance (evictor) performs abandoned object removal. | |
| removeAbandonedTimeoutDuration | back to summary |
|---|---|
| private Duration removeAbandonedTimeoutDuration Timeout before an abandoned object can be removed. | |
| requireFullStackTrace | back to summary |
|---|---|
| private boolean requireFullStackTrace Determines whether or not to log full stack traces when logAbandoned is true. If disabled, then a faster method for logging stack traces with only class data may be used if possible.
| |
| useUsageTracking | back to summary |
|---|---|
| private boolean useUsageTracking If the pool implements | |
| AbandonedConfig | back to summary |
|---|---|
| public AbandonedConfig() Creates a new instance. | |
| AbandonedConfig | back to summary |
|---|---|
| private AbandonedConfig(final AbandonedConfig abandonedConfig) Creates a new instance with values from the given instance.
| |
| copy | back to summary |
|---|---|
| public static AbandonedConfig copy(final AbandonedConfig abandonedConfig) Creates a new instance with values from the given instance.
| |
| getLogAbandoned | back to summary |
|---|---|
| public boolean getLogAbandoned() Flag to log stack traces for application code which abandoned an object. Defaults to false. Logging of abandoned objects adds overhead for every object created because a stack trace has to be generated.
| |
| getLogWriter | back to summary |
|---|---|
| public PrintWriter getLogWriter() Gets the log writer being used by this configuration to log information on abandoned objects. If not set, a PrintWriter based on System.out with the system default encoding is used.
| |
| getRemoveAbandonedOnBorrow | back to summary |
|---|---|
| public boolean getRemoveAbandonedOnBorrow() 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
| |
| getRemoveAbandonedOnMaintenance | back to summary |
|---|---|
| public boolean getRemoveAbandonedOnMaintenance() 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. This setting has no effect
unless maintenance is enabled by setting
| |
| getRemoveAbandonedTimeout | back to summary |
|---|---|
| public int getRemoveAbandonedTimeout()
Deprecated Timeout in seconds before an abandoned object can be removed. The time of most recent use of an object is the maximum (latest) of
The default value is 300 seconds.
| |
| getRemoveAbandonedTimeoutDuration | back to summary |
|---|---|
| public Duration getRemoveAbandonedTimeoutDuration() Timeout before an abandoned object can be removed. The time of most recent use of an object is the maximum (latest) of
The default value is 300 seconds.
| |
| getRequireFullStackTrace | back to summary |
|---|---|
| public boolean getRequireFullStackTrace() Indicates if full stack traces are required when
| |
| getUseUsageTracking | back to summary |
|---|---|
| public boolean getUseUsageTracking() If the pool implements
| |
| setLogAbandoned | back to summary |
|---|---|
| public void setLogAbandoned(final boolean logAbandoned) Sets the flag to log stack traces for application code which abandoned an object.
| |
| setLogWriter | back to summary |
|---|---|
| public void setLogWriter(final PrintWriter logWriter) Sets the log writer to be used by this configuration to log information on abandoned objects.
| |
| setRemoveAbandonedOnBorrow | back to summary |
|---|---|
| public void setRemoveAbandonedOnBorrow(final boolean removeAbandonedOnBorrow) Flag to remove abandoned objects if they exceed the removeAbandonedTimeout when borrowObject is invoked.
| |
| setRemoveAbandonedOnMaintenance | back to summary |
|---|---|
| public void setRemoveAbandonedOnMaintenance(final boolean removeAbandonedOnMaintenance) Flag to remove abandoned objects if they exceed the removeAbandonedTimeout when pool maintenance runs.
| |
| setRemoveAbandonedTimeout | back to summary |
|---|---|
| public void setRemoveAbandonedTimeout(final Duration removeAbandonedTimeout) Sets the timeout before an abandoned object can be removed. Setting this property has no effect if
| |
| setRemoveAbandonedTimeout | back to summary |
|---|---|
| public void setRemoveAbandonedTimeout(final int removeAbandonedTimeoutSeconds)
Deprecated Sets the timeout in seconds before an abandoned object can be removed. Setting this property has no effect if
| |
| setRequireFullStackTrace | back to summary |
|---|---|
| public void setRequireFullStackTrace(final boolean requireFullStackTrace) Sets the flag to require full stack traces for logging abandoned connections when enabled.
| |
| setUseUsageTracking | back to summary |
|---|---|
| public void setUseUsageTracking(final boolean useUsageTracking) If the pool implements
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |