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.Runnable
void performBackup() throws java.sql.SQLException
java.sql.SQLException
public void waitForBackupToBegin() throws java.lang.Exception
java.lang.Exception
public void waitForBackupToEnd() throws java.lang.Exception
java.lang.Exception
public boolean isRunning()
public void createFromBackup(java.lang.String newDbName) throws java.sql.SQLException
newDbName
- name of the database to be created.java.sql.SQLException
public void restoreFromBackup() throws java.sql.SQLException
java.sql.SQLException
Apache Derby V10.13 Internals - Copyright © 2004,2016 The Apache Software Foundation. All Rights Reserved.