xref: /aosp_15_r20/external/javasqlite/src/main/java/SQLite/BusyHandler.java (revision fd76c71b147b98c03334ec0945352cee0b39aab1)
1*fd76c71bSTreehugger Robot package SQLite;
2*fd76c71bSTreehugger Robot 
3*fd76c71bSTreehugger Robot /**
4*fd76c71bSTreehugger Robot  * Callback interface for SQLite's user defined busy handler.
5*fd76c71bSTreehugger Robot  */
6*fd76c71bSTreehugger Robot 
7*fd76c71bSTreehugger Robot public interface BusyHandler {
8*fd76c71bSTreehugger Robot 
9*fd76c71bSTreehugger Robot     /**
10*fd76c71bSTreehugger Robot      * Invoked when a table is locked by another process
11*fd76c71bSTreehugger Robot      * or thread. The method should return true for waiting
12*fd76c71bSTreehugger Robot      * until the table becomes unlocked, or false in order
13*fd76c71bSTreehugger Robot      * to abandon the action.<BR><BR>
14*fd76c71bSTreehugger Robot      *
15*fd76c71bSTreehugger Robot      * @param table the name of the locked table
16*fd76c71bSTreehugger Robot      * @param count number of times the table was locked
17*fd76c71bSTreehugger Robot      */
18*fd76c71bSTreehugger Robot 
busy(String table, int count)19*fd76c71bSTreehugger Robot     public boolean busy(String table, int count);
20*fd76c71bSTreehugger Robot }
21