| java.lang.Object org.h2.samples.ShowProgress
ShowProgress | public class ShowProgress implements DatabaseEventListener(Code) | | This example application implements a database event listener.
This is useful to display progress information while opening a large database,
or to log database exceptions.
|
Constructor Summary | |
public | ShowProgress() Create a new instance of this class, and start the timer. |
Method Summary | |
public void | closingDatabase() This method is called when the database is closed. | public void | diskSpaceIsLow(long stillAvailable) This method is called by the database if disk space is low. | public void | exceptionThrown(SQLException e, String sql) This method is called if an exception occurs in the database. | public void | init(String url) This method is called just after creating the instance. | public static void | main(String[] args) | public void | opened() This method is called when the database is open. | public void | setProgress(int state, String name, int current, int max) This method is called when opening the database to notify about the progress. | void | test() Run the progress test. |
ShowProgress | public ShowProgress()(Code) | | Create a new instance of this class, and start the timer.
|
closingDatabase | public void closingDatabase()(Code) | | This method is called when the database is closed.
|
diskSpaceIsLow | public void diskSpaceIsLow(long stillAvailable) throws SQLException(Code) | | This method is called by the database if disk space is low.
Parameters: stillAvailable - the number of bytes still available |
exceptionThrown | public void exceptionThrown(SQLException e, String sql)(Code) | | This method is called if an exception occurs in the database.
Parameters: e - the exception Parameters: sql - the SQL statement |
init | public void init(String url)(Code) | | This method is called just after creating the instance.
Parameters: url - the database URL |
opened | public void opened()(Code) | | This method is called when the database is open.
|
setProgress | public void setProgress(int state, String name, int current, int max)(Code) | | This method is called when opening the database to notify about the progress.
Parameters: state - the current state Parameters: name - the object name (depends on the state) Parameters: current - the current progress Parameters: max - the 100% mark |
|
|