Serialized Form


Package com.jolbox.bonecp

Class com.jolbox.bonecp.BoneCP extends Object implements Serializable

serialVersionUID: -8386816681977604817L

Serialized Fields

poolAvailabilityThreshold

int poolAvailabilityThreshold
Create more connections when we hit x% of our possible number of connections.


partitionCount

int partitionCount
Number of partitions passed in constructor.


partitions

ConnectionPartition[] partitions
Partitions handle.


keepAliveScheduler

ScheduledExecutorService keepAliveScheduler
Handle to factory that creates 1 thread per partition that periodically wakes up and performs some activity on the connection.


maxAliveScheduler

ScheduledExecutorService maxAliveScheduler
Handle to factory that creates 1 thread per partition that periodically wakes up and performs some activity on the connection.


connectionsScheduler

ExecutorService connectionsScheduler
Executor for threads watching each partition to dynamically create new threads/kill off excess ones.


config

BoneCPConfig config
Configuration object used in constructor.


releaseHelperThreadsConfigured

boolean releaseHelperThreadsConfigured
If set to true, config has specified the use of helper threads.


releaseHelper

ExecutorService releaseHelper
pointer to the thread containing the release helper threads.


statementCloseHelperExecutor

ExecutorService statementCloseHelperExecutor
pointer to the service containing the statement close helper threads.


asyncExecutor

ExecutorService asyncExecutor
Executor service for obtaining a connection in an asynchronous fashion.


mbs

MBeanServer mbs
JMX support.


terminationLock

Lock terminationLock
Prevent repeated termination of all connections when the DB goes down.


closeConnectionWatch

boolean closeConnectionWatch
If set to true, create a new thread that monitors a connection and displays warnings if application failed to close the connection.


closeConnectionExecutor

ExecutorService closeConnectionExecutor
Threads monitoring for bad connection requests.


poolShuttingDown

boolean poolShuttingDown
set to true if the connection pool has been flagged as shutting down.


shutdownStackTrace

String shutdownStackTrace
Placeholder to give more useful info in case of a double shutdown.


finalizableRefs

Map<K,V> finalizableRefs
Reference of objects that are to be watched.


finalizableRefQueue

com.google.common.base.FinalizableReferenceQueue finalizableRefQueue
Watch for connections that should have been safely closed but the application forgot.


connectionTimeoutInMs

long connectionTimeoutInMs
Time to wait before timing out the connection. Default in config is Long.MAX_VALUE milliseconds.


closeConnectionWatchTimeoutInMs

long closeConnectionWatchTimeoutInMs
No of ms to wait for thread.join() in connection watch thread.


statementReleaseHelperThreadsConfigured

boolean statementReleaseHelperThreadsConfigured
If set to true, config has specified the use of statement release helper threads.


statementsPendingRelease

LinkedTransferQueue<E> statementsPendingRelease
Scratch queue of statments awaiting to be closed.


statisticsEnabled

boolean statisticsEnabled
if true, we care about statistics.


statistics

Statistics statistics
statistics handle.


defaultReadOnly

Boolean defaultReadOnly
Config setting.


defaultCatalog

String defaultCatalog
Config setting.


defaultTransactionIsolationValue

int defaultTransactionIsolationValue
Config setting.


defaultAutoCommit

Boolean defaultAutoCommit
Config setting.


externalAuth

boolean externalAuth
Config setting.

Class com.jolbox.bonecp.BoneCPConfig extends Object implements Serializable

serialVersionUID: 6090570773474131622L

Serialized Fields

minConnectionsPerPartition

int minConnectionsPerPartition
Min number of connections per partition.


maxConnectionsPerPartition

int maxConnectionsPerPartition
Max number of connections per partition.


acquireIncrement

int acquireIncrement
Number of new connections to create in 1 batch.


partitionCount

int partitionCount
Number of partitions.


jdbcUrl

String jdbcUrl
DB connection string.


username

String username
User name to use.


password

String password
Password to use.


idleConnectionTestPeriodInSeconds

long idleConnectionTestPeriodInSeconds
Connections older than this are sent a keep-alive statement.


idleMaxAgeInSeconds

long idleMaxAgeInSeconds
Maximum age of an unused connection before it is closed off.


connectionTestStatement

String connectionTestStatement
SQL statement to use for keep-alive/test of connection.


statementsCacheSize

int statementsCacheSize
Min no of prepared statements to cache.


statementsCachedPerConnection

int statementsCachedPerConnection
No of statements that can be cached per connection. Deprecated.


releaseHelperThreads

int releaseHelperThreads
Number of release-connection helper threads to create per partition.


statementReleaseHelperThreads

int statementReleaseHelperThreads
Number of statement release helper threads to create.


connectionHook

ConnectionHook connectionHook
Hook class (external).


initSQL

String initSQL
Query to send once per connection to the database.


closeConnectionWatch

boolean closeConnectionWatch
If set to true, create a new thread that monitors a connection and displays warnings if application failed to close the connection. FOR DEBUG PURPOSES ONLY!


logStatementsEnabled

boolean logStatementsEnabled
If set to true, log SQL statements being executed.


acquireRetryDelayInMs

long acquireRetryDelayInMs
After attempting to acquire a connection and failing, wait for this value before attempting to acquire a new connection again.


acquireRetryAttempts

int acquireRetryAttempts
After attempting to acquire a connection and failing, try to connect these many times before giving up.


lazyInit

boolean lazyInit
If set to true, the connection pool will remain empty until the first connection is obtained.


transactionRecoveryEnabled

boolean transactionRecoveryEnabled
If set to true, stores all activity on this connection to allow for replaying it again.


connectionHookClassName

String connectionHookClassName
Connection hook class name.


classLoader

ClassLoader classLoader
Classloader to use when loading the JDBC driver.


poolName

String poolName
Name of the pool for JMX and thread names.


disableJMX

boolean disableJMX
Set to true to disable JMX.


datasourceBean

DataSource datasourceBean
If set, use datasourceBean.getConnection() to obtain a new connection.


queryExecuteTimeLimitInMs

long queryExecuteTimeLimitInMs
Queries taking longer than this limit to execute are logged.


poolAvailabilityThreshold

int poolAvailabilityThreshold
Create more connections when we hit x% of our possible number of connections.


disableConnectionTracking

boolean disableConnectionTracking
Disable connection tracking.


driverProperties

Properties driverProperties
Used when the alternate way of obtaining a connection is required


connectionTimeoutInMs

long connectionTimeoutInMs
Time to wait before a call to getConnection() times out and returns an error.


closeConnectionWatchTimeoutInMs

long closeConnectionWatchTimeoutInMs
Time in ms to wait for close connection watch thread.


maxConnectionAgeInSeconds

long maxConnectionAgeInSeconds
A connection older than maxConnectionAge will be destroyed and purged from the pool.


configFile

String configFile
Config property.


serviceOrder

String serviceOrder
Queue mode. Values currently understood are FIFO and LIFO.


statisticsEnabled

boolean statisticsEnabled
If true, keep track of some statistics.


defaultAutoCommit

Boolean defaultAutoCommit
The default auto-commit state of created connections.


defaultReadOnly

Boolean defaultReadOnly
The default read-only state of created connections.


defaultTransactionIsolation

String defaultTransactionIsolation
The default transaction isolation state of created connections.


defaultCatalog

String defaultCatalog
The default catalog state of created connections.


defaultTransactionIsolationValue

int defaultTransactionIsolationValue
The parsed transaction isolation value. Default = driver value


externalAuth

boolean externalAuth
If true, stop caring about username/password when obtaining raw connections.

Class com.jolbox.bonecp.BoneCPDataSource extends BoneCPConfig implements Serializable

serialVersionUID: -1561804548443209469L

Serialized Fields

logWriter

PrintWriter logWriter
Config setting.


rwl

ReadWriteLock rwl
Lock for init.


driverClass

String driverClass
JDBC driver to use.


multiDataSource

Map<K,V> multiDataSource
Constructs (and caches) a datasource on the fly based on the given username/password.

Class com.jolbox.bonecp.BoundedLinkedTransferQueue extends LinkedTransferQueue<E> implements Serializable

serialVersionUID: -1875525368357897907L

Serialized Fields

size

AtomicInteger size
No of elements in queue.


maxQueueSize

int maxQueueSize
bound of queue.


lock

ReentrantLock lock
Main lock guarding all access

Class com.jolbox.bonecp.ConnectionPartition extends Object implements Serializable

serialVersionUID: -7864443421028454573L

Serialized Fields

freeConnections

TransferQueue<E> freeConnections
Connections available to be taken


acquireIncrement

int acquireIncrement
When connections start running out, add these number of new connections.


minConnections

int minConnections
Minimum number of connections to start off with.


maxConnections

int maxConnections
Maximum number of connections that will ever be created.


statsLock

ReentrantReadWriteLock statsLock
Statistics lock.


createdConnections

int createdConnections
Number of connections that have been created.


url

String url
DB details.


username

String username
DB details.


password

String password
DB details.


unableToCreateMoreTransactions

boolean unableToCreateMoreTransactions
If set to true, don't bother calling method to attempt to create more connections because we've hit our limit.


connectionsPendingRelease

LinkedTransferQueue<E> connectionsPendingRelease
Scratch queue of connections awaiting to be placed back in queue.


disableTracking

boolean disableTracking
Config setting.


poolWatchThreadSignalQueue

BlockingQueue<E> poolWatchThreadSignalQueue
Signal trigger to pool watch thread. Making it a queue means our signal is persistent.


queryExecuteTimeLimitInNanoSeconds

long queryExecuteTimeLimitInNanoSeconds
Store the unit translation here to avoid recalculating it in statement handles.


poolName

String poolName
Cached copy of the config-specified pool name.


pool

BoneCP pool
Handle to the pool.

Class com.jolbox.bonecp.LIFOQueue extends LinkedBlockingDeque<E> implements Serializable

serialVersionUID: -3503791017846313243L


Package jsr166y

Class jsr166y.LinkedTransferQueue extends AbstractQueue<E> implements Serializable

serialVersionUID: -3223113410248163686L

Serialization Methods

readObject

private void readObject(ObjectInputStream s)
                 throws IOException,
                        ClassNotFoundException
Reconstitutes the Queue instance from a stream (that is, deserializes it).

Throws:
IOException
ClassNotFoundException

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
Saves the state to a stream (that is, serializes it).

Serial Data:
All of the elements (each an E) in the proper order, followed by a null
Throws:
IOException

Class jsr166y.ThreadLocalRandom extends Random implements Serializable

serialVersionUID: -5851777807851030925L

Serialized Fields

rnd

long rnd
The random seed. We can't use super.seed.


initialized

boolean initialized
Initialization flag to permit the first and only allowed call to setSeed (inside Random constructor) to succeed. We can't allow others since it would cause setting seed in one part of a program to unintentionally impact other usages by the thread.


pad0

long pad0

pad1

long pad1

pad2

long pad2

pad3

long pad3

pad4

long pad4

pad5

long pad5

pad6

long pad6

pad7

long pad7



Copyright © 2009-2011 JolBox. All Rights Reserved.