dk.netarkivet.archive.arcrepositoryadmin
Class MySQLSpecifics

java.lang.Object
  extended by dk.netarkivet.common.utils.SettingsFactory<DBSpecifics>
      extended by dk.netarkivet.archive.arcrepositoryadmin.DBSpecifics
          extended by dk.netarkivet.archive.arcrepositoryadmin.MySQLSpecifics

public class MySQLSpecifics
extends DBSpecifics


Field Summary
(package private)  org.apache.commons.logging.Log log
          The log.
 
Constructor Summary
MySQLSpecifics()
           
 
Method Summary
 void backupDatabase(java.sql.Connection c, 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.
 void shutdownDatabase()
          Shutdown the database system, if running in embedded mode.
 
Methods inherited from class dk.netarkivet.archive.arcrepositoryadmin.DBSpecifics
getInstance
 
Methods inherited from class dk.netarkivet.common.utils.SettingsFactory
getInstance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

org.apache.commons.logging.Log log
The log.

Constructor Detail

MySQLSpecifics

public MySQLSpecifics()
Method Detail

shutdownDatabase

public void shutdownDatabase()
Description copied from class: DBSpecifics
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 class DBSpecifics

backupDatabase

public void backupDatabase(java.sql.Connection c,
                           java.io.File backupDir)
                    throws java.sql.SQLException,
                           PermissionDenied
Description copied from class: DBSpecifics
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:
c - The connection to the database.
backupDir - Directory to which the database should be backed up
Throws:
java.sql.SQLException - On SQL trouble backing up database
PermissionDenied - if the directory cannot be created.

getDriverClassName

public java.lang.String getDriverClassName()
Description copied from class: DBSpecifics
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