|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.modeshape.jboss.managed.ManagedConnectionPool
public final class ManagedConnectionPool
A ManagedConnectionPool
instance is a JBoss managed object for a repository
connection pool
.
Constructor Summary | |
---|---|
ManagedConnectionPool(RepositoryConnectionPool connectionPool)
Creates a JBoss managed object for the specified connection pool. |
Method Summary | |
---|---|
boolean |
flush()
Removes all connections. |
int |
getAvailableCount()
Obtains the number of connections available for use. |
long |
getCreatedCount()
Obtains the number of connections that have been created. |
long |
getDestroyedCount()
Obtains the number of connections that have been destroyed. |
int |
getInUseCount()
Obtains the total number of times connections have been used. |
int |
getInUseHighWaterMark()
|
long |
getKeepAliveTime()
Obtains the time a connection can remain idle before being closed. |
int |
getMaxFailedAttemptsBeforeError()
Obtains the number of failed attempts at trying to a connection before throwing an error. |
int |
getMaxSize()
Obtains the maximum size of the pool. |
int |
getMinSize()
|
long |
getPingTimeout()
Obtains the time to wait for a ping to complete. |
int |
getSize()
Obtains the current number of connections. |
boolean |
getValidateConnectionBeforeUse()
Indicates if connections should be validated before being used. |
void |
setKeepAliveTime(long nanos)
Sets the time a connection can remain idle before being closed. |
void |
setMaxFailedAttemptsBeforeError(int attempts)
Sets the maximum number of attempts to try and establish a connection. |
void |
setPingTimout(long nanos)
Sets the time a ping will wait to complete. |
void |
setSize(int size)
Sets the maximum size of the number of connections allowed. |
void |
setValidateConnectionBeforeUse(boolean validate)
Sets the flag indicating if the connection should be validated before being used. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ManagedConnectionPool(RepositoryConnectionPool connectionPool)
connectionPool
- the connection pool being managed (never null
)Method Detail |
---|
public boolean flush()
true
if successfulpublic int getAvailableCount()
public long getCreatedCount()
public long getDestroyedCount()
public int getInUseCount()
public int getInUseHighWaterMark()
public long getKeepAliveTime()
public int getMaxFailedAttemptsBeforeError()
public int getMaxSize()
public int getMinSize()
public long getPingTimeout()
public int getSize()
public boolean getValidateConnectionBeforeUse()
true
if connections are validated before being usedpublic void setKeepAliveTime(long nanos)
nanos
- the new connection max idle time (must be non-negative)public void setMaxFailedAttemptsBeforeError(int attempts)
attempts
- the new maximum number of attempts (must be non-negative)public void setSize(int size)
size
- the new maximum pool size (must be positive)public void setPingTimout(long nanos)
nanos
- the new time to wait in nanoseconds (must be non-negative)public void setValidateConnectionBeforeUse(boolean validate)
validate
- the new value validate flag value
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |