Class DatabaseOverviewMBeanImpl

  • All Implemented Interfaces:
    DatabaseOverviewMBean, org.springframework.beans.factory.InitializingBean

    @ManagedResource(description="Gives an overview of the master data source of the current tenant.")
    public class DatabaseOverviewMBeanImpl
    extends AbstractJMXMBean
    implements DatabaseOverviewMBean
    hybris MBean. Gives an overview of the master data source of the current tenant.
    • Constructor Detail

      • DatabaseOverviewMBeanImpl

        public DatabaseOverviewMBeanImpl()
    • Method Detail

      • getCurrentTenantMasterDataSource

        protected HybrisDataSource getCurrentTenantMasterDataSource()
        Returns:
        the master HybrisDataSource
      • getDatabaseName

        @ManagedAttribute(description="Name of the database.")
        public java.lang.String getDatabaseName()
        Specified by:
        getDatabaseName in interface DatabaseOverviewMBean
        Returns:
        the database name
      • getDatabaseURL

        @ManagedAttribute(description="URL of the database.")
        public java.lang.String getDatabaseURL()
        Specified by:
        getDatabaseURL in interface DatabaseOverviewMBean
        Returns:
        the URL of the database
      • getDatabaseUser

        @ManagedAttribute(description="The used database user.")
        public java.lang.String getDatabaseUser()
        Specified by:
        getDatabaseUser in interface DatabaseOverviewMBean
        Returns:
        the database user
      • getDatabaseVersion

        @ManagedAttribute(description="The database version.")
        public java.lang.String getDatabaseVersion()
        Specified by:
        getDatabaseVersion in interface DatabaseOverviewMBean
        Returns:
        the database version
      • getDriverVersion

        @ManagedAttribute(description="The database driver version.")
        public java.lang.String getDriverVersion()
        Specified by:
        getDriverVersion in interface DatabaseOverviewMBean
        Returns:
        the database driver version
      • getID

        @ManagedAttribute(description="ID of the current data source.")
        public java.lang.String getID()
        Specified by:
        getID in interface DatabaseOverviewMBean
        Returns:
        the ID of the current data source
      • getJNDIName

        @ManagedAttribute(description="The Java Naming and Directory Interface name.")
        public java.lang.String getJNDIName()
        Specified by:
        getJNDIName in interface DatabaseOverviewMBean
        Returns:
        the JNDI name
      • getLoginTimeout

        @ManagedAttribute(description="Timeout for login. The zero value denotes the default system timeout if exists. Otherwise it means, that there is no timeout.")
        public java.lang.Integer getLoginTimeout()
        Description copied from interface: DatabaseOverviewMBean
        see CommonDataSource.getLoginTimeout()
        Specified by:
        getLoginTimeout in interface DatabaseOverviewMBean
      • getMaxAllowedPhysicalOpen

        @ManagedAttribute(description="The maximum number of objects that can be allocated by the connection pool.")
        public int getMaxAllowedPhysicalOpen()
        Specified by:
        getMaxAllowedPhysicalOpen in interface DatabaseOverviewMBean
        Returns:
        the maximum number of objects that can be allocated by the pool
      • getMaxInUse

        @ManagedAttribute(description="The maximum number of connections that may be used.")
        public int getMaxInUse()
        Specified by:
        getMaxInUse in interface DatabaseOverviewMBean
        Returns:
        the maximum number of the 'in use' connection
      • getMaxPhysicalOpen

        @ManagedAttribute(description="The maximum number of physical SQL connections.")
        public int getMaxPhysicalOpen()
        Specified by:
        getMaxPhysicalOpen in interface DatabaseOverviewMBean
        Returns:
        the maximum number of physical SQL connections.
      • getMaxPreparedParameterCount

        @ManagedAttribute(description="The maximum number of parameters within one prepared statement. If no limit exists, the value is -1.")
        public int getMaxPreparedParameterCount()
        Specified by:
        getMaxPreparedParameterCount in interface DatabaseOverviewMBean
        Returns:
        the maximum allowed number of parameters within one prepared statement; -1 if no limit exists
      • getMillisWaitedForConnection

        @ManagedAttribute(description="Time in milliseconds that was needed to get a connection from the pool.")
        public long getMillisWaitedForConnection()
        Specified by:
        getMillisWaitedForConnection in interface DatabaseOverviewMBean
        Returns:
        the time in milliseconds how long it took to get a connection from the pool
      • getNumInUse

        @ManagedAttribute(description="The number of instances currently borrowed from the pool.")
        public int getNumInUse()
        Specified by:
        getNumInUse in interface DatabaseOverviewMBean
        Returns:
        the number of instances currently borrowed from the pool.
      • getNumPhysicalOpen

        @ManagedAttribute(description="The number of currently open JDBC connections.")
        public int getNumPhysicalOpen()
        Specified by:
        getNumPhysicalOpen in interface DatabaseOverviewMBean
        Returns:
        number of currently open JDBC connections.
      • getSchemaName

        @ManagedAttribute(description="The schema name of the database.")
        public java.lang.String getSchemaName()
        Specified by:
        getSchemaName in interface DatabaseOverviewMBean
        Returns:
        the schema name of the database
      • isCanConnectToDataSource

        @ManagedAttribute(description="Is set to true if a connection to the pool is possible.")
        public boolean isCanConnectToDataSource()
        Specified by:
        isCanConnectToDataSource in interface DatabaseOverviewMBean
        Returns:
        false if a connection the pool is not possible.
      • getTablePrefix

        @ManagedAttribute(description="The table prefix for all tables.")
        public java.lang.String getTablePrefix()
        Specified by:
        getTablePrefix in interface DatabaseOverviewMBean
        Returns:
        the table prefix for all tables
      • isReadOnly

        @ManagedAttribute(description="Is set to true if the data source is in read-only mode.")
        public boolean isReadOnly()
        Specified by:
        isReadOnly in interface DatabaseOverviewMBean
        Returns:
        true if the datasoure is read-only
      • isActive

        @ManagedAttribute(description="Is set to true if the current data source is active.")
        public boolean isActive()
        Specified by:
        isActive in interface DatabaseOverviewMBean
        Returns:
        true if the current data source is active.
      • getAllDataSourceIDs

        @ManagedAttribute(description="A list of IDs of all available data source.")
        public java.util.Set<java.lang.String> getAllDataSourceIDs()
        Specified by:
        getAllDataSourceIDs in interface DatabaseOverviewMBean
        Returns:
        a list with all available data source IDs for the current tenant
      • getConnections

        @ManagedAttribute(description="The total number of connections.")
        public long getConnections()
        Specified by:
        getConnections in interface DatabaseOverviewMBean
        Returns:
        the total number of connections so far. Reset with resetStats()