Package org.sqlite
Class BusyHandler
java.lang.Object
org.sqlite.BusyHandler
https://www.sqlite.org/c3ref/busy_handler.html
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract int
callback
(int nbPrevInvok) https://www.sqlite.org/c3ref/busy_handler.htmlstatic final void
clearHandler
(Connection conn) Clears any busy handler registered with the connection.static final void
setHandler
(Connection conn, BusyHandler busyHandler) Sets a busy handler for the connection.
-
Constructor Details
-
BusyHandler
public BusyHandler()
-
-
Method Details
-
setHandler
Sets a busy handler for the connection.- Parameters:
conn
- the SQLite connectionbusyHandler
- the busyHandler- Throws:
SQLException
-
clearHandler
Clears any busy handler registered with the connection.- Parameters:
conn
- the SQLite connection- Throws:
SQLException
-
callback
https://www.sqlite.org/c3ref/busy_handler.html- Parameters:
nbPrevInvok
- number of times that the busy handler has been invoked previously for the same locking event- Returns:
- If the busy callback returns 0, then no additional attempts are made to access the database and SQLITE_BUSY is returned to the application. If the callback returns non-zero, then another attempt is made to access the database and the cycle repeats.
- Throws:
SQLException
-