com.caucho.sql
Class DatabaseAdmin

java.lang.Object
  extended by com.caucho.management.server.AbstractManagedObject
      extended by com.caucho.sql.DatabaseAdmin
All Implemented Interfaces:
ConnectionPoolMXBean, DatabaseMXBean, ManagedObjectMXBean

public class DatabaseAdmin
extends AbstractManagedObject
implements DatabaseMXBean


Constructor Summary
DatabaseAdmin(DBPool dbPool, ConnectionPool jcaPool)
           
 
Method Summary
 void clear()
          Clears all idle connections in the pool.
 void close()
           
 int getConnectionActiveCount()
          Returns the number of active connections.
 int getConnectionCount()
          Returns the total number of connections.
 long getConnectionCountTotal()
          Returns the total number of connections.
 int getConnectionCreateCount()
          Returns the number of idle connections.
 long getConnectionCreateCountTotal()
          Returns the total number of created connections.
 long getConnectionFailCountTotal()
          Returns the total number of failed connections.
 int getConnectionIdleCount()
          Returns the number of idle connections.
 long getConnectionWaitTime()
          How long to wait for connections when timed out.
 JdbcDriverMXBean[] getDrivers()
          Returns the pool's jdbc drivers
 java.util.Date getLastFailTime()
          Returns the last failed connection time.
 long getMaxActiveTime()
          Returns the pool active time in milliseconds.
 int getMaxConnections()
          Returns the maximum number of connections.
 int getMaxCreateConnections()
          Returns the max number of connections trying to connect.
 int getMaxIdleCount()
          Returns the maximum number of idle connections
 long getMaxIdleTime()
          Returns the pool idle time in milliseconds.
 int getMaxOverflowConnections()
          Returns the number of overflow connections.
 long getMaxPoolTime()
          Returns the pool time in milliseconds.
 int getMinIdleCount()
          Returns the maximum number of idle connections
 java.lang.String getName()
          The JMX name property of the mbean.
 java.lang.String getUrl()
          Returns the primary URL for the database.
 boolean isLocalTransactionOptimization()
          Returns true if the local-transaction-optimization is allowed
 boolean isShareable()
          Returns true for the JCA shared attribute.
 boolean isSpy()
          Returns true if spy is enabled
 java.lang.String toString()
           
 
Methods inherited from class com.caucho.management.server.AbstractManagedObject
addObjectNameProperties, getObjectName, getType, registerSelf, unregisterSelf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.caucho.management.server.ManagedObjectMXBean
getObjectName, getType
 

Constructor Detail

DatabaseAdmin

public DatabaseAdmin(DBPool dbPool,
                     ConnectionPool jcaPool)
Method Detail

getUrl

public java.lang.String getUrl()
Description copied from interface: DatabaseMXBean
Returns the primary URL for the database.

Specified by:
getUrl in interface DatabaseMXBean

isSpy

public boolean isSpy()
Returns true if spy is enabled

Specified by:
isSpy in interface DatabaseMXBean

getDrivers

public JdbcDriverMXBean[] getDrivers()
Returns the pool's jdbc drivers

Specified by:
getDrivers in interface DatabaseMXBean

getName

public java.lang.String getName()
Description copied from class: AbstractManagedObject
The JMX name property of the mbean.

Specified by:
getName in interface ManagedObjectMXBean
Specified by:
getName in class AbstractManagedObject

getMaxConnections

public int getMaxConnections()
Returns the maximum number of connections.

Specified by:
getMaxConnections in interface ConnectionPoolMXBean

getMaxOverflowConnections

public int getMaxOverflowConnections()
Returns the number of overflow connections.

Specified by:
getMaxOverflowConnections in interface ConnectionPoolMXBean

getMaxCreateConnections

public int getMaxCreateConnections()
Returns the max number of connections trying to connect.

Specified by:
getMaxCreateConnections in interface ConnectionPoolMXBean

getMaxIdleTime

public long getMaxIdleTime()
Returns the pool idle time in milliseconds.

Specified by:
getMaxIdleTime in interface ConnectionPoolMXBean

getMaxIdleCount

public int getMaxIdleCount()
Returns the maximum number of idle connections

Specified by:
getMaxIdleCount in interface ConnectionPoolMXBean

getMinIdleCount

public int getMinIdleCount()
Returns the maximum number of idle connections

Specified by:
getMinIdleCount in interface ConnectionPoolMXBean

getMaxActiveTime

public long getMaxActiveTime()
Returns the pool active time in milliseconds.

Specified by:
getMaxActiveTime in interface ConnectionPoolMXBean

getMaxPoolTime

public long getMaxPoolTime()
Returns the pool time in milliseconds.

Specified by:
getMaxPoolTime in interface ConnectionPoolMXBean

getConnectionWaitTime

public long getConnectionWaitTime()
How long to wait for connections when timed out.

Specified by:
getConnectionWaitTime in interface ConnectionPoolMXBean

isShareable

public boolean isShareable()
Returns true for the JCA shared attribute.

Specified by:
isShareable in interface ConnectionPoolMXBean

isLocalTransactionOptimization

public boolean isLocalTransactionOptimization()
Returns true if the local-transaction-optimization is allowed

Specified by:
isLocalTransactionOptimization in interface ConnectionPoolMXBean

getConnectionCount

public int getConnectionCount()
Returns the total number of connections.

Specified by:
getConnectionCount in interface ConnectionPoolMXBean

getConnectionActiveCount

public int getConnectionActiveCount()
Returns the number of active connections.

Specified by:
getConnectionActiveCount in interface ConnectionPoolMXBean

getConnectionIdleCount

public int getConnectionIdleCount()
Returns the number of idle connections.

Specified by:
getConnectionIdleCount in interface ConnectionPoolMXBean

getConnectionCreateCount

public int getConnectionCreateCount()
Returns the number of idle connections.

Specified by:
getConnectionCreateCount in interface ConnectionPoolMXBean

getConnectionCountTotal

public long getConnectionCountTotal()
Returns the total number of connections.

Specified by:
getConnectionCountTotal in interface ConnectionPoolMXBean

getConnectionCreateCountTotal

public long getConnectionCreateCountTotal()
Returns the total number of created connections.

Specified by:
getConnectionCreateCountTotal in interface ConnectionPoolMXBean

getConnectionFailCountTotal

public long getConnectionFailCountTotal()
Returns the total number of failed connections.

Specified by:
getConnectionFailCountTotal in interface ConnectionPoolMXBean

getLastFailTime

public java.util.Date getLastFailTime()
Returns the last failed connection time.

Specified by:
getLastFailTime in interface ConnectionPoolMXBean

clear

public void clear()
Clears all idle connections in the pool.

Specified by:
clear in interface ConnectionPoolMXBean

close

public void close()

toString

public java.lang.String toString()
Overrides:
toString in class AbstractManagedObject