public class FBStatisticsManager extends FBServiceManager implements StatisticsManager
FBStatisticsManager class is responsible for replicating the functionality of
the gstat command-line tool.
This functionality includes:
StatisticsManager.DatabaseTransactionInfoBUFFER_SIZEDATA_TABLE_STATISTICS, INDEX_STATISTICS, RECORD_VERSION_STATISTICS, SYSTEM_TABLE_STATISTICS| Constructor and Description |
|---|
FBStatisticsManager()
Create a new instance of
FBMaintenanceManager based on
the default GDSType. |
FBStatisticsManager(GDSType gdsType)
Create a new instance of
FBMaintenanceManager based on
a given GDSType. |
FBStatisticsManager(java.lang.String gdsType)
Create a new instance of
FBMaintenanceManager based on
a given GDSType. |
| Modifier and Type | Method and Description |
|---|---|
void |
getDatabaseStatistics()
Get the full database statistics information, excluding system table information.
|
void |
getDatabaseStatistics(int options)
Get specific database statistics.
|
StatisticsManager.DatabaseTransactionInfo |
getDatabaseTransactionInfo()
Get transaction information of the database specified in
database. |
static StatisticsManager.DatabaseTransactionInfo |
getDatabaseTransactionInfo(java.sql.Connection connection)
Get transaction information for an existing database connection.
|
void |
getHeaderPage()
Fetch the database statistics header page.
|
void |
getTableStatistics(java.lang.String[] tableNames)
Get the table statistics.
|
attachDatabase, attachServiceManager, createRequestBuffer, executeServicesOperation, executeServicesOperation, getAuthPlugins, getCharSet, getDatabase, getDbCryptConfig, getHost, getLogger, getPassword, getPort, getServerVersion, getServiceName, getUser, getWireCrypt, isWireCompression, queueService, setAuthPlugins, setCharSet, setDatabase, setDbCryptConfig, setHost, setLogger, setPassword, setPort, setUser, setWireCompression, setWireCryptclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAuthPlugins, getCharSet, getDatabase, getDbCryptConfig, getHost, getLogger, getPassword, getPort, getServerVersion, getUser, getWireCrypt, isWireCompression, setAuthPlugins, setCharSet, setDatabase, setDbCryptConfig, setHost, setLogger, setPassword, setPort, setUser, setWireCompression, setWireCryptpublic FBStatisticsManager()
FBMaintenanceManager based on
the default GDSType.public FBStatisticsManager(java.lang.String gdsType)
FBMaintenanceManager based on
a given GDSType.gdsType - type must be PURE_JAVA, EMBEDDED, or NATIVEpublic FBStatisticsManager(GDSType gdsType)
FBMaintenanceManager based on
a given GDSType.gdsType - The GDS implementation type to usepublic void getHeaderPage()
throws java.sql.SQLException
StatisticsManager
The header information is written to this StatisticsManager's logger.
getHeaderPage in interface StatisticsManagerjava.sql.SQLException - if a database access error occurspublic void getDatabaseStatistics()
throws java.sql.SQLException
StatisticsManager
The statistics information is written to this StatisticsManager's logger.
The listed data includes:
Invoking this method is equivalent to the default behaviour of gstat on the command-line.
getDatabaseStatistics in interface StatisticsManagerjava.sql.SQLException - if a database access error occurspublic void getDatabaseStatistics(int options)
throws java.sql.SQLException
StatisticsManager
The statistics information is written to this StatisticsManager's logger. All invocations of
this method will result in the header page and log data being output.
The following options can be supplied as a bitmask:
DATA_TABLE_STATISTICSSYSTEM_TABLE_STATISTICSINDEX_STATISTICSRECORD_VERSION_STATISTICS
If this method is invoked with 0 as the options value, only the header and log statistics will
be output.
getDatabaseStatistics in interface StatisticsManageroptions - A bitmask combination of
DATA_TABLE_STATISTICS,
SYSTEM_TABLE_STATISTICS,
INDEX_STATISTICS, or
RECORD_VERSION_STATISTICS.
Can also be 0, which is equivalent to calling method StatisticsManager.getDatabaseStatistics()java.sql.SQLExceptionpublic void getTableStatistics(java.lang.String[] tableNames)
throws java.sql.SQLException
StatisticsManager
The statistics information is written to this StatisticsManager's logger.
The listed data includes:
Invoking this method is equivalent to the behaviour of gstat -t <table name> on the command-line.
getTableStatistics in interface StatisticsManagertableNames - array of table names to analyze.java.sql.SQLException - if something went wrong.public StatisticsManager.DatabaseTransactionInfo getDatabaseTransactionInfo() throws java.sql.SQLException
StatisticsManagerdatabase.getDatabaseTransactionInfo in interface StatisticsManagerjava.sql.SQLException - If database is not specified, or for failures to connect or retrieve informationpublic static StatisticsManager.DatabaseTransactionInfo getDatabaseTransactionInfo(java.sql.Connection connection) throws java.sql.SQLException
connection - Database connection; must unwrap to FirebirdConnection.java.sql.SQLException - If connection does not unwrap to FirebirdConnection, or for failures to
retrieve informationCopyright © 2001-2023 Jaybird (Firebird JDBC/JCA) team. All rights reserved.