## org.h2.jmx
Class DatabaseInfo

    java.lang.Object
      org.h2.jmx.DatabaseInfo

All Implemented Interfaces:
  DatabaseInfoMBean

    public class DatabaseInfo

extends java.lang.Object
implements DatabaseInfoMBean

The MBean implementation.

Method Summary
`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).
`java.lang.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).
`java.lang.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?
`java.lang.String` `listSessions()` List sessions, including the queries that are in progress, and locked tables.
`java.lang.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(java.lang.String name)` Unregisters the MBean for the database if one is registered.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### registerMBean

    public static void registerMBean(ConnectionInfo connectionInfo,
                                     Database database)
                              throws javax.management.JMException

  Registers an MBean for the database.

  Parameters:
    `connectionInfo` - connection info
    `database` - database
  Throws:
    `javax.management.JMException`

### unregisterMBean

    public static void unregisterMBean(java.lang.String name)
                                throws java.lang.Exception

  Unregisters the MBean for the database if one is registered.

  Parameters:
    `name` - database name
  Throws:
    `java.lang.Exception`

### isExclusive

    public boolean isExclusive()

  Description copied from interface: `DatabaseInfoMBean`
  Is the database open in exclusive mode?

  Specified by:
    `isExclusive` in interface `DatabaseInfoMBean`
  Returns:
    true if the database is open in exclusive mode, false otherwise

### isReadOnly

    public boolean isReadOnly()

  Description copied from interface: `DatabaseInfoMBean`
  Is the database read-only?

  Specified by:
    `isReadOnly` in interface `DatabaseInfoMBean`
  Returns:
    true if the database is read-only, false otherwise

### getMode

    public java.lang.String getMode()

  Description copied from interface: `DatabaseInfoMBean`
  The database compatibility mode (REGULAR if no compatibility mode is used).

  Specified by:
    `getMode` in interface `DatabaseInfoMBean`
  Returns:
    the database mode

### isMultiThreaded

    public boolean isMultiThreaded()

  Description copied from interface: `DatabaseInfoMBean`
  Is multi-threading enabled?

  Specified by:
    `isMultiThreaded` in interface `DatabaseInfoMBean`
  Returns:
    true if multi-threading is enabled, false otherwise

### isMvcc

    public boolean isMvcc()

  Description copied from interface: `DatabaseInfoMBean`
  Is MVCC (multi version concurrency) enabled?

  Specified by:
    `isMvcc` in interface `DatabaseInfoMBean`
  Returns:
    true if MVCC is enabled, false otherwise

### getLogMode

    public int getLogMode()

  Description copied from interface: `DatabaseInfoMBean`
  The transaction log mode (0 disabled, 1 without sync, 2 enabled).

  Specified by:
    `getLogMode` in interface `DatabaseInfoMBean`
  Returns:
    the transaction log mode

### setLogMode

    public void setLogMode(int value)

  Description copied from interface: `DatabaseInfoMBean`
  Set the transaction log mode.

  Specified by:
    `setLogMode` in interface `DatabaseInfoMBean`
  Parameters:
    `value` - the new log mode

### getTraceLevel

    public int getTraceLevel()

  Description copied from interface: `DatabaseInfoMBean`
  The trace level (0 disabled, 1 error, 2 info, 3 debug).

  Specified by:
    `getTraceLevel` in interface `DatabaseInfoMBean`
  Returns:
    the level

### setTraceLevel

    public void setTraceLevel(int level)

  Description copied from interface: `DatabaseInfoMBean`
  Set the trace level.

  Specified by:
    `setTraceLevel` in interface `DatabaseInfoMBean`
  Parameters:
    `level` - the new value

### getFileWriteCountTotal

    public long getFileWriteCountTotal()

  Description copied from interface: `DatabaseInfoMBean`
  The number of write operations since the database was created.

  Specified by:
    `getFileWriteCountTotal` in interface `DatabaseInfoMBean`
  Returns:
    the total write count

### getFileWriteCount

    public long getFileWriteCount()

  Description copied from interface: `DatabaseInfoMBean`
  The number of write operations since the database was opened.

  Specified by:
    `getFileWriteCount` in interface `DatabaseInfoMBean`
  Returns:
    the write count

### getFileReadCount

    public long getFileReadCount()

  Description copied from interface: `DatabaseInfoMBean`
  The file read count since the database was opened.

  Specified by:
    `getFileReadCount` in interface `DatabaseInfoMBean`
  Returns:
    the read count

### getFileSize

    public long getFileSize()

  Description copied from interface: `DatabaseInfoMBean`
  The database file size in KB.

  Specified by:
    `getFileSize` in interface `DatabaseInfoMBean`
  Returns:
    the number of pages

### getCacheSizeMax

    public int getCacheSizeMax()

  Description copied from interface: `DatabaseInfoMBean`
  The maximum cache size in KB.

  Specified by:
    `getCacheSizeMax` in interface `DatabaseInfoMBean`
  Returns:
    the maximum size

### setCacheSizeMax

    public void setCacheSizeMax(int kb)

  Description copied from interface: `DatabaseInfoMBean`
  Change the maximum size.

  Specified by:
    `setCacheSizeMax` in interface `DatabaseInfoMBean`
  Parameters:
    `kb` - the cache size in KB.

### getCacheSize

    public int getCacheSize()

  Description copied from interface: `DatabaseInfoMBean`
  The current cache size in KB.

  Specified by:
    `getCacheSize` in interface `DatabaseInfoMBean`
  Returns:
    the current size

### getVersion

    public java.lang.String getVersion()

  Description copied from interface: `DatabaseInfoMBean`
  The database version.

  Specified by:
    `getVersion` in interface `DatabaseInfoMBean`
  Returns:
    the version

### listSettings

    public java.lang.String listSettings()

  Description copied from interface: `DatabaseInfoMBean`
  List the database settings.

  Specified by:
    `listSettings` in interface `DatabaseInfoMBean`
  Returns:
    the database settings

### listSessions

    public java.lang.String listSessions()

  Description copied from interface: `DatabaseInfoMBean`
  List sessions, including the queries that are in progress, and locked tables.

  Specified by:
    `listSessions` in interface `DatabaseInfoMBean`
  Returns:
    information about the sessions