Interface StatisticsManager
- 
- All Superinterfaces:
- AttachmentProperties,- BaseProperties,- ServiceConnectionProperties,- ServiceManager
 - All Known Implementing Classes:
- FBStatisticsManager
 
 public interface StatisticsManager extends ServiceManager AStatisticsManageris responsible for replicating the functionality of thegstatcommand-line tool.This functionality includes: - Retrieving data table statistics
- Retrieving the database header page
- Retrieving index statistics
- Retrieving database logging information
- Retrieving statistics for the data dictionary
 - Author:
- Gabriel Reid
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Interface Description static classStatisticsManager.DatabaseTransactionInfo
 - 
Field SummaryFields Modifier and Type Field Description static intDATA_TABLE_STATISTICSRequest statistics on data tables.static intINDEX_STATISTICSRequest statistics on indexes.static intRECORD_VERSION_STATISTICSRequest statistics on record versions.static intSYSTEM_TABLE_STATISTICSRequest statistics on system tables.
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description voidgetDatabaseStatistics()Get the full database statistics information, excluding system table information.voidgetDatabaseStatistics(int options)Get specific database statistics.StatisticsManager.DatabaseTransactionInfogetDatabaseTransactionInfo()Get transaction information of the database specified indatabase.voidgetHeaderPage()Fetch the database statistics header page.voidgetTableStatistics(java.lang.String[] tableNames)Get the table statistics.- 
Methods inherited from interface org.firebirdsql.jaybird.props.AttachmentPropertiesgetAuthPlugins, getCharSet, getConnectTimeout, getDbCryptConfig, getEncoding, getParallelWorkers, getPassword, getPortNumber, getProcessId, getProcessName, getRoleName, getServerName, getSocketBufferSize, getSoTimeout, getType, getUser, getWireCrypt, isWireCompression, setAuthPlugins, setCharSet, setConnectTimeout, setDbCryptConfig, setEncoding, setParallelWorkers, setPassword, setPortNumber, setProcessId, setProcessName, setRoleName, setServerName, setSocketBufferSize, setSoTimeout, setType, setUser, setWireCompression, setWireCrypt
 - 
Methods inherited from interface org.firebirdsql.jaybird.props.BasePropertiesconnectionPropertyValues, getBooleanProperty, getBooleanProperty, getIntProperty, getIntProperty, getProperty, getProperty, setBooleanProperty, setIntProperty, setProperty
 - 
Methods inherited from interface org.firebirdsql.jaybird.props.ServiceConnectionPropertiesgetExpectedDb, getServiceName, setExpectedDb, setServiceName
 - 
Methods inherited from interface org.firebirdsql.management.ServiceManagergetDatabase, getHost, getLogger, getPort, getServerVersion, getWireCryptAsEnum, setDatabase, setHost, setLogger, setPort, setWireCryptAsEnum
 
- 
 
- 
- 
- 
Field Detail- 
DATA_TABLE_STATISTICSstatic final int DATA_TABLE_STATISTICS Request statistics on data tables.- See Also:
- Constant Field Values
 
 - 
INDEX_STATISTICSstatic final int INDEX_STATISTICS Request statistics on indexes.- See Also:
- Constant Field Values
 
 - 
SYSTEM_TABLE_STATISTICSstatic final int SYSTEM_TABLE_STATISTICS Request statistics on system tables.- See Also:
- Constant Field Values
 
 - 
RECORD_VERSION_STATISTICSstatic final int RECORD_VERSION_STATISTICS Request statistics on record versions.- See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
getHeaderPagevoid getHeaderPage() throws java.sql.SQLExceptionFetch the database statistics header page.The header information is written to this StatisticsManager's logger.- Throws:
- java.sql.SQLException- if a database access error occurs
 
 - 
getDatabaseStatisticsvoid getDatabaseStatistics() throws java.sql.SQLExceptionGet the full database statistics information, excluding system table information.The statistics information is written to this StatisticsManager's logger.The listed data includes: - statistics header page
- log statistics
- index statistics
- data table statistics
 Invoking this method is equivalent to the default behaviour of gstaton the command-line.- Throws:
- java.sql.SQLException- if a database access error occurs
 
 - 
getDatabaseStatisticsvoid getDatabaseStatistics(int options) throws java.sql.SQLExceptionGet specific database statistics.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_STATISTICS
- SYSTEM_TABLE_STATISTICS
- INDEX_STATISTICS
- RECORD_VERSION_STATISTICS
 If this method is invoked with 0as theoptionsvalue, only the header and log statistics will be output.- Parameters:
- options- 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- getDatabaseStatistics()
- Throws:
- java.sql.SQLException
 
 - 
getTableStatisticsvoid getTableStatistics(java.lang.String[] tableNames) throws java.sql.SQLExceptionGet the table statistics.The statistics information is written to this StatisticsManager's logger.The listed data includes: - the primary pointer and index root page numbers
- number of data pages and their average fill
- fill distribution
 Invoking this method is equivalent to the behaviour of gstat -t <table name>on the command-line.- Parameters:
- tableNames- array of table names to analyze.
- Throws:
- java.sql.SQLException- if something went wrong.
 
 - 
getDatabaseTransactionInfoStatisticsManager.DatabaseTransactionInfo getDatabaseTransactionInfo() throws java.sql.SQLException Get transaction information of the database specified indatabase.- Returns:
- Database transaction information
- Throws:
- java.sql.SQLException- If- databaseis not specified, or for failures to connect or retrieve information
 
 
- 
 
-