public class OnlineBackup
extends java.lang.Object
implements java.lang.Runnable
| Modifier and Type | Field and Description |
|---|---|
private java.lang.Throwable |
backupError |
private boolean |
backupFailed |
private java.lang.String |
backupPath |
private boolean |
beginBackup |
private java.lang.String |
dbName |
private boolean |
endBackup |
| Constructor and Description |
|---|
OnlineBackup(java.lang.String dbName,
java.lang.String backupPath) |
| Modifier and Type | Method and Description |
|---|---|
void |
createFromBackup(java.lang.String newDbName)
Create a new database from the backup copy taken earlier.
|
boolean |
isRunning()
Check if backup is running ?
|
(package private) void |
performBackup()
Backup the database
|
void |
restoreFromBackup()
Restore the database from the backup copy taken earlier.
|
void |
run()
implementation of run() method in the Runnable interface, which
is invoked when a thread is started using this class object.
|
void |
waitForBackupToBegin()
Wait for the backup to start.
|
void |
waitForBackupToEnd() |
private java.lang.String dbName
private boolean beginBackup
private boolean endBackup
private boolean backupFailed
private java.lang.Throwable backupError
private java.lang.String backupPath
public void run()
run in interface java.lang.Runnablevoid performBackup()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void waitForBackupToBegin()
throws java.lang.Exception
java.lang.Exceptionpublic void waitForBackupToEnd()
throws java.lang.Exception
java.lang.Exceptionpublic boolean isRunning()
public void createFromBackup(java.lang.String newDbName)
throws java.sql.SQLException
newDbName - name of the database to be created.java.sql.SQLExceptionpublic void restoreFromBackup()
throws java.sql.SQLException
java.sql.SQLExceptionApache Derby V10.10 Internals - Copyright © 2004,2014 The Apache Software Foundation. All Rights Reserved.