dk.netarkivet.archive.arcrepositoryadmin
Class PostgreSQLSpecifics
java.lang.Object
dk.netarkivet.common.utils.SettingsFactory<DBSpecifics>
dk.netarkivet.archive.arcrepositoryadmin.DBSpecifics
dk.netarkivet.archive.arcrepositoryadmin.PostgreSQLSpecifics
public class PostgreSQLSpecifics
- extends DBSpecifics
Field Summary |
(package private) org.apache.commons.logging.Log |
log
The log. |
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. |
static DBSpecifics |
getInstance()
Factory method discoverable by reflection from
SettingsFactory.getInstance(). |
void |
shutdownDatabase()
Shutdown the database system, if running in embedded mode. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
org.apache.commons.logging.Log log
- The log.
PostgreSQLSpecifics
public PostgreSQLSpecifics()
getInstance
public static DBSpecifics getInstance()
- Factory method discoverable by reflection from
SettingsFactory.getInstance().
- Returns:
- a new instance of theis class.
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