Class ConnectionMBeanImpl

java.lang.Object
org.deltava.util.jmx.ConnectionMBeanImpl
All Implemented Interfaces:
ConnectionMBean

public class ConnectionMBeanImpl extends Object implements ConnectionMBean
A JMX bean for JDBC connection information.
Since:
10.2
Version:
11.4
Author:
Luke
  • Constructor Details

    • ConnectionMBeanImpl

      ConnectionMBeanImpl(org.gvagroup.pool.ConnectionInfo inf)
      Creates the bean.
      Parameters:
      inf - a ConnectionInfo bean
  • Method Details

    • getID

      public Integer getID()
      Description copied from interface: ConnectionMBean
      Returns the connection ID.
      Specified by:
      getID in interface ConnectionMBean
      Returns:
      the ID
    • isDynamic

      public Boolean isDynamic()
      Description copied from interface: ConnectionMBean
      Returns whether the connection is dynamic.
      Specified by:
      isDynamic in interface ConnectionMBean
      Returns:
      TRUE if dynamic, otherwise FALSE
    • inUse

      public Boolean inUse()
      Description copied from interface: ConnectionMBean
      Returns whether the connection is currently in use.
      Specified by:
      inUse in interface ConnectionMBean
      Returns:
      TRUE if in use, otherwise FALSE
    • getUseCount

      public Long getUseCount()
      Description copied from interface: ConnectionMBean
      Returns the number of times this connection has been reserved.
      Specified by:
      getUseCount in interface ConnectionMBean
      Returns:
      the number of reservations
    • getTotalUse

      public Long getTotalUse()
      Description copied from interface: ConnectionMBean
      Returns the total amount of time this connection has been reserved.
      Specified by:
      getTotalUse in interface ConnectionMBean
      Returns:
      the total time in milliseconds
    • getAverageUse

      public Integer getAverageUse()
      Description copied from interface: ConnectionMBean
      Returns the average amount of time a connection has been used when reserved.
      Specified by:
      getAverageUse in interface ConnectionMBean
      Returns:
      the average reservation time in milliseconds, or zero if never reserved
    • getLastUse

      public Instant getLastUse()
      Description copied from interface: ConnectionMBean
      Returns the time this connection was last reserved.
      Specified by:
      getLastUse in interface ConnectionMBean
      Returns:
      the last reservation date/time