Package org.h2.test.db
Class TestOpenClose.MyDatabaseEventListener
- java.lang.Object
-
- org.h2.test.db.TestOpenClose.MyDatabaseEventListener
-
- All Implemented Interfaces:
java.util.EventListener,DatabaseEventListener
- Enclosing class:
- TestOpenClose
public static final class TestOpenClose.MyDatabaseEventListener extends java.lang.Object implements DatabaseEventListener
A database event listener used in this test.
-
-
Field Summary
-
Fields inherited from interface org.h2.api.DatabaseEventListener
STATE_BACKUP_FILE, STATE_CREATE_INDEX, STATE_RECONNECTED, STATE_RECOVER, STATE_SCAN_FILE, STATE_STATEMENT_END, STATE_STATEMENT_PROGRESS, STATE_STATEMENT_START
-
-
Constructor Summary
Constructors Constructor Description MyDatabaseEventListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexceptionThrown(java.sql.SQLException e, java.lang.String sql)This method is called if an exception occurred.voidsetProgress(int state, java.lang.String name, long current, long max)This method is called for long running events, such as recovering, scanning a file or building an index.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.h2.api.DatabaseEventListener
closingDatabase, init, opened
-
-
-
-
Method Detail
-
exceptionThrown
public void exceptionThrown(java.sql.SQLException e, java.lang.String sql)Description copied from interface:DatabaseEventListenerThis method is called if an exception occurred.- Specified by:
exceptionThrownin interfaceDatabaseEventListener- Parameters:
e- the exceptionsql- the SQL statement
-
setProgress
public void setProgress(int state, java.lang.String name, long current, long max)Description copied from interface:DatabaseEventListenerThis method is called for long running events, such as recovering, scanning a file or building an index.More states might be added in future versions, therefore implementations should silently ignore states that they don't understand.
- Specified by:
setProgressin interfaceDatabaseEventListener- Parameters:
state- the statename- the object namecurrent- the current positionmax- the highest possible value or 0 if unknown
-
-