Class DatabaseOverviewMBeanImpl
- java.lang.Object
-
- de.hybris.platform.jmx.mbeans.impl.JMXBindableTenantAwareObject
-
- de.hybris.platform.jmx.mbeans.impl.AbstractJMXMBean
-
- de.hybris.platform.jmx.mbeans.impl.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.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class de.hybris.platform.jmx.mbeans.impl.AbstractJMXMBean
AbstractJMXMBean.TenantAwareExecutor<T>
-
-
Constructor Summary
Constructors Constructor Description DatabaseOverviewMBeanImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Set<java.lang.String>getAllDataSourceIDs()longgetConnections()protected HybrisDataSourcegetCurrentTenantMasterDataSource()java.lang.StringgetDatabaseName()java.lang.StringgetDatabaseURL()java.lang.StringgetDatabaseUser()java.lang.StringgetDatabaseVersion()java.lang.StringgetDriverVersion()java.lang.StringgetID()java.lang.StringgetJNDIName()java.lang.IntegergetLoginTimeout()seeCommonDataSource.getLoginTimeout()intgetMaxAllowedPhysicalOpen()intgetMaxInUse()intgetMaxPhysicalOpen()intgetMaxPreparedParameterCount()longgetMillisWaitedForConnection()intgetNumInUse()intgetNumPhysicalOpen()java.lang.StringgetSchemaName()java.lang.StringgetTablePrefix()booleanisActive()booleanisCanConnectToDataSource()booleanisReadOnly()voidresetStats()Reset the statistics.-
Methods inherited from class de.hybris.platform.jmx.mbeans.impl.AbstractJMXMBean
activateTenant, afterPropertiesSet, deactivateTenant, getBeanInterface, getObjectName, isJNDIContextAware, setBeanInterface, setJmxPath
-
Methods inherited from class de.hybris.platform.jmx.mbeans.impl.JMXBindableTenantAwareObject
getJmxDomain, getJmxPath, getObjectNameString, getTenantId, setTenant
-
-
-
-
Method Detail
-
getCurrentTenantMasterDataSource
protected HybrisDataSource getCurrentTenantMasterDataSource()
- Returns:
- the master HybrisDataSource
-
getDatabaseName
@ManagedAttribute(description="Name of the database.") public java.lang.String getDatabaseName()
- Specified by:
getDatabaseNamein interfaceDatabaseOverviewMBean- Returns:
- the database name
-
getDatabaseURL
@ManagedAttribute(description="URL of the database.") public java.lang.String getDatabaseURL()
- Specified by:
getDatabaseURLin interfaceDatabaseOverviewMBean- Returns:
- the URL of the database
-
getDatabaseUser
@ManagedAttribute(description="The used database user.") public java.lang.String getDatabaseUser()
- Specified by:
getDatabaseUserin interfaceDatabaseOverviewMBean- Returns:
- the database user
-
getDatabaseVersion
@ManagedAttribute(description="The database version.") public java.lang.String getDatabaseVersion()
- Specified by:
getDatabaseVersionin interfaceDatabaseOverviewMBean- Returns:
- the database version
-
getDriverVersion
@ManagedAttribute(description="The database driver version.") public java.lang.String getDriverVersion()
- Specified by:
getDriverVersionin interfaceDatabaseOverviewMBean- Returns:
- the database driver version
-
getID
@ManagedAttribute(description="ID of the current data source.") public java.lang.String getID()
- Specified by:
getIDin interfaceDatabaseOverviewMBean- 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:
getJNDINamein interfaceDatabaseOverviewMBean- 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:DatabaseOverviewMBeanseeCommonDataSource.getLoginTimeout()- Specified by:
getLoginTimeoutin interfaceDatabaseOverviewMBean
-
getMaxAllowedPhysicalOpen
@ManagedAttribute(description="The maximum number of objects that can be allocated by the connection pool.") public int getMaxAllowedPhysicalOpen()
- Specified by:
getMaxAllowedPhysicalOpenin interfaceDatabaseOverviewMBean- 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:
getMaxInUsein interfaceDatabaseOverviewMBean- Returns:
- the maximum number of the 'in use' connection
-
getMaxPhysicalOpen
@ManagedAttribute(description="The maximum number of physical SQL connections.") public int getMaxPhysicalOpen()
- Specified by:
getMaxPhysicalOpenin interfaceDatabaseOverviewMBean- 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:
getMaxPreparedParameterCountin interfaceDatabaseOverviewMBean- 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:
getMillisWaitedForConnectionin interfaceDatabaseOverviewMBean- 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:
getNumInUsein interfaceDatabaseOverviewMBean- 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:
getNumPhysicalOpenin interfaceDatabaseOverviewMBean- Returns:
- number of currently open JDBC connections.
-
getSchemaName
@ManagedAttribute(description="The schema name of the database.") public java.lang.String getSchemaName()
- Specified by:
getSchemaNamein interfaceDatabaseOverviewMBean- 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:
isCanConnectToDataSourcein interfaceDatabaseOverviewMBean- Returns:
falseif a connection the pool is not possible.
-
getTablePrefix
@ManagedAttribute(description="The table prefix for all tables.") public java.lang.String getTablePrefix()
- Specified by:
getTablePrefixin interfaceDatabaseOverviewMBean- 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:
isReadOnlyin interfaceDatabaseOverviewMBean- Returns:
trueif the datasoure is read-only
-
resetStats
@ManagedOperation(description="Reset values for MillisWaitedForConnection, MaxInUse and Connections.") public void resetStats()
Description copied from interface:DatabaseOverviewMBeanReset the statistics. Those areDatabaseOverviewMBean.getMillisWaitedForConnection(),DatabaseOverviewMBean.getMaxInUse()andDatabaseOverviewMBean.getConnections()- Specified by:
resetStatsin interfaceDatabaseOverviewMBean
-
isActive
@ManagedAttribute(description="Is set to true if the current data source is active.") public boolean isActive()
- Specified by:
isActivein interfaceDatabaseOverviewMBean- Returns:
trueif 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:
getAllDataSourceIDsin interfaceDatabaseOverviewMBean- 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:
getConnectionsin interfaceDatabaseOverviewMBean- Returns:
- the total number of connections so far. Reset with resetStats()
-
-