public class DatabaseInfo extends Object implements DatabaseInfoMBean
Modifier and Type | Method and Description |
---|---|
int |
getCacheSize()
The current cache size in KB.
|
int |
getCacheSizeMax()
The maximum cache size in KB.
|
long |
getFileReadCount()
The file read count since the database was opened.
|
long |
getFileSize()
The database file size in KB.
|
long |
getFileWriteCount()
The number of write operations since the database was opened.
|
long |
getFileWriteCountTotal()
The number of write operations since the database was created.
|
int |
getLogMode()
The transaction log mode (0 disabled, 1 without sync, 2 enabled).
|
String |
getMode()
The database compatibility mode (REGULAR if no compatibility mode is
used).
|
int |
getTraceLevel()
The trace level (0 disabled, 1 error, 2 info, 3 debug).
|
String |
getVersion()
The database version.
|
boolean |
isExclusive()
Is the database open in exclusive mode?
|
boolean |
isMultiThreaded()
Is multi-threading enabled?
|
boolean |
isMvcc()
Is MVCC (multi version concurrency) enabled?
|
boolean |
isReadOnly()
Is the database read-only?
|
String |
listSessions()
List sessions, including the queries that are in
progress, and locked tables.
|
String |
listSettings()
List the database settings.
|
static void |
registerMBean(ConnectionInfo connectionInfo,
Database database)
Registers an MBean for the database.
|
void |
setCacheSizeMax(int kb)
Change the maximum size.
|
void |
setLogMode(int value)
Set the transaction log mode.
|
void |
setTraceLevel(int level)
Set the trace level.
|
static void |
unregisterMBean(String name)
Unregisters the MBean for the database if one is registered.
|
public static void registerMBean(ConnectionInfo connectionInfo, Database database) throws JMException
connectionInfo
- connection infodatabase
- databaseJMException
public static void unregisterMBean(String name) throws Exception
name
- database nameException
public boolean isExclusive()
DatabaseInfoMBean
isExclusive
in interface DatabaseInfoMBean
public boolean isReadOnly()
DatabaseInfoMBean
isReadOnly
in interface DatabaseInfoMBean
public String getMode()
DatabaseInfoMBean
getMode
in interface DatabaseInfoMBean
public boolean isMultiThreaded()
DatabaseInfoMBean
isMultiThreaded
in interface DatabaseInfoMBean
public boolean isMvcc()
DatabaseInfoMBean
isMvcc
in interface DatabaseInfoMBean
public int getLogMode()
DatabaseInfoMBean
getLogMode
in interface DatabaseInfoMBean
public void setLogMode(int value)
DatabaseInfoMBean
setLogMode
in interface DatabaseInfoMBean
value
- the new log modepublic int getTraceLevel()
DatabaseInfoMBean
getTraceLevel
in interface DatabaseInfoMBean
public void setTraceLevel(int level)
DatabaseInfoMBean
setTraceLevel
in interface DatabaseInfoMBean
level
- the new valuepublic long getFileWriteCountTotal()
DatabaseInfoMBean
getFileWriteCountTotal
in interface DatabaseInfoMBean
public long getFileWriteCount()
DatabaseInfoMBean
getFileWriteCount
in interface DatabaseInfoMBean
public long getFileReadCount()
DatabaseInfoMBean
getFileReadCount
in interface DatabaseInfoMBean
public long getFileSize()
DatabaseInfoMBean
getFileSize
in interface DatabaseInfoMBean
public int getCacheSizeMax()
DatabaseInfoMBean
getCacheSizeMax
in interface DatabaseInfoMBean
public void setCacheSizeMax(int kb)
DatabaseInfoMBean
setCacheSizeMax
in interface DatabaseInfoMBean
kb
- the cache size in KB.public int getCacheSize()
DatabaseInfoMBean
getCacheSize
in interface DatabaseInfoMBean
public String getVersion()
DatabaseInfoMBean
getVersion
in interface DatabaseInfoMBean
public String listSettings()
DatabaseInfoMBean
listSettings
in interface DatabaseInfoMBean
public String listSessions()
DatabaseInfoMBean
listSessions
in interface DatabaseInfoMBean
Copyright © 2012 JBoss by Red Hat. All Rights Reserved.