public class ShowProgress extends java.lang.Object implements DatabaseEventListener
STATE_BACKUP_FILE, STATE_CREATE_INDEX, STATE_RECONNECTED, STATE_RECOVER, STATE_SCAN_FILE, STATE_STATEMENT_END, STATE_STATEMENT_PROGRESS, STATE_STATEMENT_START| Constructor and Description |
|---|
ShowProgress()
Create a new instance of this class, and startNs the timer.
|
| Modifier and Type | Method and Description |
|---|---|
void |
closingDatabase()
This method is called when the database is closed.
|
void |
exceptionThrown(java.sql.SQLException e,
java.lang.String sql)
This method is called if an exception occurs in the database.
|
void |
init(java.lang.String url)
This method is called just after creating the instance.
|
static void |
main(java.lang.String... args)
This method is called when executing this sample application from the
command line.
|
void |
opened()
This method is called when the database is open.
|
void |
setProgress(int state,
java.lang.String name,
int current,
int max)
This method is called when opening the database to notify about the
progress.
|
public ShowProgress()
public static void main(java.lang.String... args)
throws java.lang.Exception
args - the command line parametersjava.lang.Exceptionpublic void exceptionThrown(java.sql.SQLException e,
java.lang.String sql)
exceptionThrown in interface DatabaseEventListenere - the exceptionsql - the SQL statementpublic void setProgress(int state,
java.lang.String name,
int current,
int max)
setProgress in interface DatabaseEventListenerstate - the current statename - the object name (depends on the state)current - the current progressmax - the 100% markpublic void closingDatabase()
closingDatabase in interface DatabaseEventListenerpublic void init(java.lang.String url)
init in interface DatabaseEventListenerurl - the database URLpublic void opened()
opened in interface DatabaseEventListener