Class TestDatabaseEventListener.MyDatabaseEventListener

java.lang.Object
org.h2.test.jdbc.TestDatabaseEventListener.MyDatabaseEventListener
All Implemented Interfaces:
EventListener, DatabaseEventListener
Enclosing class:
TestDatabaseEventListener

public static final class TestDatabaseEventListener.MyDatabaseEventListener extends Object implements DatabaseEventListener
The database event listener for this test.
  • Constructor Details

    • MyDatabaseEventListener

      public MyDatabaseEventListener()
  • Method Details

    • closingDatabase

      public void closingDatabase()
      Description copied from interface: DatabaseEventListener
      This method is called before the database is closed normally. It is safe to connect to the database and execute statements at this point, however the connection must be closed before the method returns.
      Specified by:
      closingDatabase in interface DatabaseEventListener
    • opened

      public void opened()
      Description copied from interface: DatabaseEventListener
      This method is called after the database has been opened. It is safe to connect to the database and execute statements at this point.
      Specified by:
      opened in interface DatabaseEventListener
    • setProgress

      public void setProgress(int state, String name, long x, long max)
      Description copied from interface: DatabaseEventListener
      This 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:
      setProgress in interface DatabaseEventListener
      Parameters:
      state - the state
      name - the object name
      x - the current position
      max - the highest possible value or 0 if unknown