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()
long
getConnections()
protected HybrisDataSource
getCurrentTenantMasterDataSource()
java.lang.String
getDatabaseName()
java.lang.String
getDatabaseURL()
java.lang.String
getDatabaseUser()
java.lang.String
getDatabaseVersion()
java.lang.String
getDriverVersion()
java.lang.String
getID()
java.lang.String
getJNDIName()
java.lang.Integer
getLoginTimeout()
seeCommonDataSource.getLoginTimeout()
int
getMaxAllowedPhysicalOpen()
int
getMaxInUse()
int
getMaxPhysicalOpen()
int
getMaxPreparedParameterCount()
long
getMillisWaitedForConnection()
int
getNumInUse()
int
getNumPhysicalOpen()
java.lang.String
getSchemaName()
java.lang.String
getTablePrefix()
boolean
isActive()
boolean
isCanConnectToDataSource()
boolean
isReadOnly()
void
resetStats()
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:
getDatabaseName
in interfaceDatabaseOverviewMBean
- Returns:
- the database name
-
getDatabaseURL
@ManagedAttribute(description="URL of the database.") public java.lang.String getDatabaseURL()
- Specified by:
getDatabaseURL
in interfaceDatabaseOverviewMBean
- Returns:
- the URL of the database
-
getDatabaseUser
@ManagedAttribute(description="The used database user.") public java.lang.String getDatabaseUser()
- Specified by:
getDatabaseUser
in interfaceDatabaseOverviewMBean
- Returns:
- the database user
-
getDatabaseVersion
@ManagedAttribute(description="The database version.") public java.lang.String getDatabaseVersion()
- Specified by:
getDatabaseVersion
in interfaceDatabaseOverviewMBean
- Returns:
- the database version
-
getDriverVersion
@ManagedAttribute(description="The database driver version.") public java.lang.String getDriverVersion()
- Specified by:
getDriverVersion
in interfaceDatabaseOverviewMBean
- Returns:
- the database driver version
-
getID
@ManagedAttribute(description="ID of the current data source.") public java.lang.String getID()
- Specified by:
getID
in 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:
getJNDIName
in 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:DatabaseOverviewMBean
seeCommonDataSource.getLoginTimeout()
- Specified by:
getLoginTimeout
in interfaceDatabaseOverviewMBean
-
getMaxAllowedPhysicalOpen
@ManagedAttribute(description="The maximum number of objects that can be allocated by the connection pool.") public int getMaxAllowedPhysicalOpen()
- Specified by:
getMaxAllowedPhysicalOpen
in 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:
getMaxInUse
in 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:
getMaxPhysicalOpen
in 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:
getMaxPreparedParameterCount
in 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:
getMillisWaitedForConnection
in 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:
getNumInUse
in 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:
getNumPhysicalOpen
in interfaceDatabaseOverviewMBean
- 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 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:
isCanConnectToDataSource
in interfaceDatabaseOverviewMBean
- 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 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:
isReadOnly
in interfaceDatabaseOverviewMBean
- Returns:
true
if the datasoure is read-only
-
resetStats
@ManagedOperation(description="Reset values for MillisWaitedForConnection, MaxInUse and Connections.") public void resetStats()
Description copied from interface:DatabaseOverviewMBean
Reset the statistics. Those areDatabaseOverviewMBean.getMillisWaitedForConnection()
,DatabaseOverviewMBean.getMaxInUse()
andDatabaseOverviewMBean.getConnections()
- Specified by:
resetStats
in interfaceDatabaseOverviewMBean
-
isActive
@ManagedAttribute(description="Is set to true if the current data source is active.") public boolean isActive()
- Specified by:
isActive
in interfaceDatabaseOverviewMBean
- 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 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:
getConnections
in interfaceDatabaseOverviewMBean
- Returns:
- the total number of connections so far. Reset with resetStats()
-
-