Class DerbyEmbeddedSpecifics
- java.lang.Object
-
- dk.netarkivet.common.utils.SettingsFactory<DBSpecifics>
-
- dk.netarkivet.archive.arcrepositoryadmin.DBSpecifics
-
- dk.netarkivet.archive.arcrepositoryadmin.DerbySpecifics
-
- dk.netarkivet.archive.arcrepositoryadmin.DerbyEmbeddedSpecifics
-
public class DerbyEmbeddedSpecifics extends DerbySpecifics
A class that implement functionality specific to the embedded Derby system.
-
-
Field Summary
-
Fields inherited from class dk.netarkivet.archive.arcrepositoryadmin.DerbySpecifics
log
-
-
Constructor Summary
Constructors Constructor Description DerbyEmbeddedSpecifics()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
backupDatabase(Connection c, File backupDir)
Backup the database.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 in embedded mode.-
Methods inherited from class dk.netarkivet.common.utils.SettingsFactory
getInstance
-
-
-
-
Method Detail
-
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 in embedded mode. Otherwise, this is ignored.Will log a warning on errors, but otherwise ignore them.
- Specified by:
shutdownDatabase
in classDBSpecifics
-
backupDatabase
public void backupDatabase(Connection c, File backupDir) throws PermissionDenied, ArgumentNotValid, IOFailure
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 classDBSpecifics
- Parameters:
backupDir
- Directory to which the database should be backed upc
- The connection to the database.- Throws:
PermissionDenied
- if the directory cannot be created.IOFailure
- If we cannot connect to the databaseArgumentNotValid
- If the connection or the backupDir if null.
-
getDriverClassName
public String getDriverClassName()
Get the name of the JDBC driver class that handles interfacing to this server.- Specified by:
getDriverClassName
in classDBSpecifics
- Returns:
- The name of a JDBC driver class
-
-