Package org.h2.jmx
Interface DatabaseInfoMBean
- All Known Implementing Classes:
DatabaseInfo
public interface DatabaseInfoMBean
Information and management operations for the given database.
-
Method Summary
Modifier and TypeMethodDescriptionint
The current cache size in KB.int
The maximum cache size in KB.long
The file read count since the database was opened.long
The database file size in KB.long
The number of write operations since the database was opened.getMode()
The database compatibility mode (REGULAR if no compatibility mode is used).int
The trace level (0 disabled, 1 error, 2 info, 3 debug).The database version.boolean
Is the database open in exclusive mode?boolean
Is the database read-only?List sessions, including the queries that are in progress, and locked tables.List the database settings.void
setCacheSizeMax
(int kb) Change the maximum size.void
setTraceLevel
(int level) Set the trace level.
-
Method Details
-
isExclusive
boolean isExclusive()Is the database open in exclusive mode?- Returns:
- true if the database is open in exclusive mode, false otherwise
-
isReadOnly
boolean isReadOnly()Is the database read-only?- Returns:
- true if the database is read-only, false otherwise
-
getMode
String getMode()The database compatibility mode (REGULAR if no compatibility mode is used).- Returns:
- the database mode
-
getFileWriteCount
long getFileWriteCount()The number of write operations since the database was opened.- Returns:
- the write count
-
getFileReadCount
long getFileReadCount()The file read count since the database was opened.- Returns:
- the read count
-
getFileSize
long getFileSize()The database file size in KB.- Returns:
- the number of pages
-
getCacheSizeMax
int getCacheSizeMax()The maximum cache size in KB.- Returns:
- the maximum size
-
setCacheSizeMax
void setCacheSizeMax(int kb) Change the maximum size.- Parameters:
kb
- the cache size in KB.
-
getCacheSize
int getCacheSize()The current cache size in KB.- Returns:
- the current size
-
getVersion
String getVersion()The database version.- Returns:
- the version
-
getTraceLevel
int getTraceLevel()The trace level (0 disabled, 1 error, 2 info, 3 debug).- Returns:
- the level
-
setTraceLevel
void setTraceLevel(int level) Set the trace level.- Parameters:
level
- the new value
-
listSettings
String listSettings()List the database settings.- Returns:
- the database settings
-
listSessions
String listSessions()List sessions, including the queries that are in progress, and locked tables.- Returns:
- information about the sessions
-