Android Open Source - sqldb Multiple Cursor Handler






From Project

Back to project page sqldb.

License

The source code is released under:

MIT License

If you think the Android project sqldb listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package prj.sqldb;
/*  w w  w  . j a v  a  2s . co  m*/
import java.util.Iterator;

public interface MultipleCursorHandler<T>
{
    /*
     * This method is executed on a DB reader thread
     * Its implementation should get a cursor by looping over the
     * provided iterator and and obtaining a QueryResult from iter.next()
     * The cursor is available from QueryResult.getCursor(). The cursor
     * should then be used and results converted to some type useful for the application
     */

    T convert(Iterator<QueryResult> iter);

    /*
     * This method is called on a thread provided by the ExecutorService that
     * is given to SqlDb in its constructor
     * It provides the application with the result of the work done in the handle() method.
     */

    void callback(T aggregatedResults);
}




Java Source Code List

prj.sqldb.CursorHandler.java
prj.sqldb.DBCallback.java
prj.sqldb.MultipleCursorHandler.java
prj.sqldb.QueryParams.java
prj.sqldb.QueryResult.java
prj.sqldb.SequentialCursorProcessor.java
prj.sqldb.SqlDb.java
prj.sqldb.threading.ExceptionThrowingFutureTask.java
prj.sqldb.threading.Later.java
prj.sqldb.threading.SqlDBThreads.java