Interface DBManager
-
- All Known Implementing Classes:
HsqlDbManager
,SQLiteDBManager
public interface DBManager
The interface for the internal database.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.io.File
backupDatabase(java.io.File targetFolder, java.lang.String baseFilename)
Creates a single-file backup of the internal db in the specified folder.Table
createTable()
long
getDatabaseSize()
javax.sql.DataSource
getDataSource()
SDriver
getDriver()
Returns the driver for the DBManager.InternalDBFlavor
getFlavor()
boolean
isNewDatabase()
boolean
isRunning()
void
restoreFromDBBackup(java.io.File tempFile)
void
setAutoBackupCount(int autoBackupCount)
void
setAutoBackupDelay(int autoBackupDelay)
void
setAutoBackupsEnabled(boolean b)
void
setDefragDelay(int defragFreqMin)
void
setFaultCount(int faultCount)
void
shutdown(boolean compact)
void
startup()
-
-
-
Method Detail
-
setAutoBackupCount
void setAutoBackupCount(int autoBackupCount)
-
setAutoBackupDelay
void setAutoBackupDelay(int autoBackupDelay)
-
setFaultCount
void setFaultCount(int faultCount)
-
setAutoBackupsEnabled
void setAutoBackupsEnabled(boolean b)
-
setDefragDelay
void setDefragDelay(int defragFreqMin)
-
isNewDatabase
boolean isNewDatabase()
-
isRunning
boolean isRunning()
-
shutdown
void shutdown(boolean compact)
-
getDataSource
javax.sql.DataSource getDataSource()
-
getDatabaseSize
long getDatabaseSize()
-
restoreFromDBBackup
void restoreFromDBBackup(java.io.File tempFile) throws java.io.IOException
- Throws:
java.io.IOException
-
backupDatabase
java.io.File backupDatabase(java.io.File targetFolder, java.lang.String baseFilename) throws java.io.IOException
Creates a single-file backup of the internal db in the specified folder. The full path to the backup is returned. The filename should start with the base, but should then be identifiable by the specific db system.- Throws:
java.io.IOException
-
startup
void startup() throws DBStartupException
- Throws:
DBStartupException
-
getDriver
SDriver getDriver()
Returns the driver for the DBManager. Important: the driver holds a session, so a new instance should be created each time.
-
createTable
Table createTable()
-
getFlavor
InternalDBFlavor getFlavor()
-
-