dk.netarkivet.harvester.datamodel
Class DerbyEmbeddedSpecifics
java.lang.Object
dk.netarkivet.common.utils.SettingsFactory<DBSpecifics>
dk.netarkivet.harvester.datamodel.DBSpecifics
dk.netarkivet.harvester.datamodel.DerbySpecifics
dk.netarkivet.harvester.datamodel.DerbyEmbeddedSpecifics
public class DerbyEmbeddedSpecifics
- extends DerbySpecifics
A class that implement functionality specific to the embedded Derby system.
Method Summary |
void |
backupDatabase(java.io.File backupDir)
Backup the database. |
java.lang.String |
getDriverClassName()
Get the name of the JDBC driver class that handles interfacing
to this server. |
static DBSpecifics |
getInstance()
Get an instance of the Embedded Derby specifics. |
void |
shutdownDatabase()
Shutdown the database system, if running embeddedly. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DerbyEmbeddedSpecifics
public DerbyEmbeddedSpecifics()
getInstance
public static DBSpecifics getInstance()
- Get an instance of the Embedded Derby specifics.
- Returns:
- Instance of the Derby specifics implementation
shutdownDatabase
public void shutdownDatabase()
- Shutdown the database system, if running embeddedly. Otherwise, this
is ignored.
Will log a warning on errors, but otherwise ignore them.
- Specified by:
shutdownDatabase
in class DBSpecifics
backupDatabase
public void backupDatabase(java.io.File backupDir)
throws java.sql.SQLException
- Backup the database. For server-based databases, where the administrator
is expected to perform the backups, this method should do nothing.
This method gets called within one hour of the hour-of-day indicated
by the DB_BACKUP_INIT_HOUR settings.
- Specified by:
backupDatabase
in class DBSpecifics
- Parameters:
backupDir
- Directory to which the database should be backed up
- Throws:
java.sql.SQLException
- If the underlying SQL driver throws an exception
PermissionDenied
- if the directory cannot be created.
IOFailure
- If we cannot connect to the database
getDriverClassName
public java.lang.String getDriverClassName()
- Get the name of the JDBC driver class that handles interfacing
to this server.
- Specified by:
getDriverClassName
in class DBSpecifics
- Returns:
- The name of a JDBC driver class