org.sqlite.event
Class ProgressHandler

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

public abstract class ProgressHandler
extends Callback

Query Progress Callbacks class.

See Also:
Query Progress Callbacks, JdbcConnection.setProgressHandler(ProgressHandler), JdbcConnection.clearProgressHandler()

Constructor Summary
ProgressHandler(int opecodes)
          default constructor.
 
Method Summary
 int getOpCodes()
          Returns the number of opcodes for progress callback
 void register(SWIGTYPE_p_sqlite3 db)
          invoke sqlite3_progress_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 xProgress()
          Called from the sqlite3_exec(), sqlite3_step(), sqlite3_get_table() 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

ProgressHandler

public ProgressHandler(int opecodes)
default constructor.

Parameters:
opecodes - the number of opcodes for progress callback
Method Detail

register

public final void register(SWIGTYPE_p_sqlite3 db)
invoke sqlite3_progress_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.
See Also:
Database.setProgressHandler(ProgressHandler)

unregister

public final void unregister(SWIGTYPE_p_sqlite3 db)
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.
See Also:
Database.clearProgressHandler()

getOpCodes

public int getOpCodes()
Returns the number of opcodes for progress callback

Returns:
the number of opcodes for progress callback

xProgress

protected abstract int xProgress()
Called from the sqlite3_exec(), sqlite3_step(), sqlite3_get_table() function.

Returns:
0 if the operation is continued. non-zero if the operation is interrupted.