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 data source of the current tenant.")
public class DatabaseOverviewMBeanImpl
extends AbstractJMXMBean
implements DatabaseOverviewMBean
hybris MBean. Gives an overview of the 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 -
Method Summary
Modifier and TypeMethodDescriptionlongprotected HybrisDataSourceprotected Optional<HybrisDataSource>getID()intintintintlongintintbooleanisActive()booleanbooleanvoidReset the statistics.Methods inherited from class de.hybris.platform.jmx.mbeans.impl.AbstractJMXMBean
activateTenant, afterPropertiesSet, deactivateTenant, getBeanInterface, getObjectName, isJNDIContextAware, setBeanInterface, setJmxPathMethods inherited from class de.hybris.platform.jmx.mbeans.impl.JMXBindableTenantAwareObject
getJmxDomain, getJmxPath, getObjectNameString, getTenantId, setTenant
-
Constructor Details
-
DatabaseOverviewMBeanImpl
public DatabaseOverviewMBeanImpl()
-
-
Method Details
-
getCurrentTenantMasterDataSource
- Returns:
- the master HybrisDataSource
-
getCurrentTenantReadOnlyDataSource
- Returns:
- the read-only HybrisDataSource
-
getDatabaseName
- Specified by:
getDatabaseNamein interfaceDatabaseOverviewMBean- Returns:
- the database name
-
getDatabaseURL
- Specified by:
getDatabaseURLin interfaceDatabaseOverviewMBean- Returns:
- the URL of the database
-
getDatabaseUser
- Specified by:
getDatabaseUserin interfaceDatabaseOverviewMBean- Returns:
- the database user
-
getDatabaseVersion
- Specified by:
getDatabaseVersionin interfaceDatabaseOverviewMBean- Returns:
- the database version
-
getDriverVersion
- Specified by:
getDriverVersionin interfaceDatabaseOverviewMBean- Returns:
- the database driver version
-
getID
- Specified by:
getIDin interfaceDatabaseOverviewMBean- Returns:
- the ID of the current data source
-
getJNDIName
@ManagedAttribute(description="The Java Naming and Directory Interface name.") public 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 Integer getLoginTimeout()Description copied from interface:DatabaseOverviewMBean- 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
- 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
- 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 TotalGets.") 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 Set<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()
-
getReadOnlyDataSourceReadOnlyConnectionsNumber
@ManagedAttribute(description="The total number of read-only connections.") public Integer getReadOnlyDataSourceReadOnlyConnectionsNumber()- Specified by:
getReadOnlyDataSourceReadOnlyConnectionsNumberin interfaceDatabaseOverviewMBean- Returns:
- the total number of read-only connections open to read-only data source.
-
getReadOnlyDataSourceReadWriteConnectionsNumber
@ManagedAttribute(description="The total number of read-write connections from read-only data source.") public Integer getReadOnlyDataSourceReadWriteConnectionsNumber()- Specified by:
getReadOnlyDataSourceReadWriteConnectionsNumberin interfaceDatabaseOverviewMBean- Returns:
- the total number of read-write connections open to read-only data source.
-