Interface DBManager
- All Known Implementing Classes:
HsqlDbManager
,SQLiteDBManager
public interface DBManager
The interface for the internal database.
-
Method Summary
Modifier and TypeMethodDescriptionbackupDatabase
(File targetFolder, String baseFilename) Creates a single-file backup of the internal db in the specified folder.long
Returns the driver for the DBManager.boolean
boolean
void
restoreFromDBBackup
(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 Details
-
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
DataSource getDataSource() -
getDatabaseSize
long getDatabaseSize() -
restoreFromDBBackup
- Throws:
IOException
-
backupDatabase
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:
IOException
-
startup
- 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()
-