|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jolbox.bonecp.ConnectionPartition
public class ConnectionPartition
Connection Partition structure
| Field Summary | |
|---|---|
protected BoneCP |
pool
Handle to the pool. |
protected ReentrantReadWriteLock |
statsLock
Statistics lock. |
| Constructor Summary | |
|---|---|
ConnectionPartition(BoneCP pool)
Partition constructor |
|
| Method Summary | |
|---|---|
protected void |
addFreeConnection(ConnectionHandle connectionHandle)
Adds a free connection. |
protected int |
getAcquireIncrement()
|
protected int |
getAvailableConnections()
Returns the number of avail connections |
protected LinkedTransferQueue<ConnectionHandle> |
getConnectionsPendingRelease()
Gets handle to a release connection handle queue. |
protected int |
getCreatedConnections()
|
protected TransferQueue<ConnectionHandle> |
getFreeConnections()
|
protected int |
getMaxConnections()
|
protected int |
getMinConnections()
|
protected String |
getPassword()
|
protected BlockingQueue<Object> |
getPoolWatchThreadSignalQueue()
Returns a handle to the poolWatchThreadSignalQueue |
protected long |
getQueryExecuteTimeLimitinNanoSeconds()
Store the unit translation here to avoid recalculating it in the constructor of StatementHandle. |
int |
getRemainingCapacity()
Returns no of free slots. |
protected String |
getUrl()
|
protected String |
getUsername()
|
protected boolean |
isUnableToCreateMoreTransactions()
Returns true if we have created all the connections we can |
protected void |
setFreeConnections(TransferQueue<ConnectionHandle> freeConnections)
|
protected void |
setUnableToCreateMoreTransactions(boolean unableToCreateMoreTransactions)
Sets connection creation possible status |
protected void |
trackConnectionFinalizer(ConnectionHandle connectionHandle)
This method is a replacement for finalize() but avoids all its pitfalls (see Joshua Bloch et. |
protected void |
updateCreatedConnections(int increment)
Updates leased connections statistics |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected ReentrantReadWriteLock statsLock
protected BoneCP pool
| Constructor Detail |
|---|
public ConnectionPartition(BoneCP pool)
pool - handle to connection pool| Method Detail |
|---|
protected BlockingQueue<Object> getPoolWatchThreadSignalQueue()
protected void updateCreatedConnections(int increment)
increment - value to add/subtract
protected void addFreeConnection(ConnectionHandle connectionHandle)
throws SQLException
connectionHandle -
SQLException - on errorprotected void trackConnectionFinalizer(ConnectionHandle connectionHandle)
connectionHandle - handle to watchprotected TransferQueue<ConnectionHandle> getFreeConnections()
protected void setFreeConnections(TransferQueue<ConnectionHandle> freeConnections)
freeConnections - the freeConnections to setprotected int getAcquireIncrement()
protected int getMinConnections()
protected int getMaxConnections()
protected int getCreatedConnections()
protected String getUrl()
protected String getUsername()
protected String getPassword()
protected boolean isUnableToCreateMoreTransactions()
protected void setUnableToCreateMoreTransactions(boolean unableToCreateMoreTransactions)
unableToCreateMoreTransactions - t/fprotected LinkedTransferQueue<ConnectionHandle> getConnectionsPendingRelease()
protected int getAvailableConnections()
public int getRemainingCapacity()
protected long getQueryExecuteTimeLimitinNanoSeconds()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||