org.sqlite.event
Class BusyHandler

java.lang.Object
  extended by org.sqlite.callback.Callback
      extended by org.sqlite.event.BusyHandler

public abstract class BusyHandler
extends Callback

SQLITE_BUSY Error Handler class.

See Also:
Register A Callback To Handle SQLITE_BUSY Errors, JdbcConnection.setBusyHandler(BusyHandler), JdbcConnection.clearBusyHandler()

Constructor Summary
BusyHandler()
           
 
Method Summary
 void register(SWIGTYPE_p_sqlite3 db)
          invoke sqlite3_busy_handler() function and this object is registered in the database.
WARNING! Do not use this method because it is called internally.
 void unregister(SWIGTYPE_p_sqlite3 db)
          Unregister this object from the database.
WARNING! Do not use this method because it is called internally.
protected abstract  int xBusy(int count)
          Called from the sqlite3_step() function.
 
Methods inherited from class org.sqlite.callback.Callback
delete, isRegistered
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BusyHandler

public BusyHandler()
Method Detail

register

public final void register(SWIGTYPE_p_sqlite3 db)
                    throws java.sql.SQLException
invoke sqlite3_busy_handler() function and this object is registered in the database.
WARNING! Do not use this method because it is called internally.

Specified by:
register in class Callback
Parameters:
db - the database handle.
Throws:
java.sql.SQLException - When the return value of the sqlite3_busy_handler() function is not SQLITE_OK.
See Also:
Database.setBusyHandler(BusyHandler)

unregister

public final void unregister(SWIGTYPE_p_sqlite3 db)
                      throws java.sql.SQLException
Unregister this object from the database.
WARNING! Do not use this method because it is called internally.

Specified by:
unregister in class Callback
Parameters:
db - the database handle.
Throws:
java.sql.SQLException - When the return value of the sqlite3_busy_handler() function is not SQLITE_OK.
See Also:
Database.clearBusyHandler()

xBusy

protected abstract int xBusy(int count)
Called from the sqlite3_step() function.

Parameters:
count - the number of times that the busy handler has been invoked for this locking event.
Returns:
non-zero if the operation is continued. 0 if the operation is interrupted.