ContentPager.QueryRunner


interface ContentPager.QueryRunner

Known direct subclasses
LoaderQueryRunner

A ContentPager.QueryRunner that executes queries using a LoaderManager.


Implementations of this interface provide the mechanism for execution of queries off the UI thread.

Summary

Nested types

Callback that receives a cursor once a query as been executed on the Runner.

Public functions

Unit
cancel(query: Query)

Attempt to cancel a (presumably) running query.

Boolean
isRunning(query: Query)
Unit

Execute a query.

Public functions

cancel

Added in 1.0.0
fun cancel(query: Query): Unit

Attempt to cancel a (presumably) running query.

Parameters
query: Query

The query in question.

isRunning

Added in 1.0.0
fun isRunning(query: Query): Boolean
Parameters
query: Query

The query in question.

Returns
Boolean

true if the query is already running.

query

Added in 1.0.0
fun query(query: Query, callback: ContentPager.QueryRunner.Callback): Unit

Execute a query.

Parameters
query: Query

The query that will be run. This value should be handed back to the callback when ready to run in the background.

callback: ContentPager.QueryRunner.Callback

The callback that should be called to both execute the query (in the background) and to receive the results (in the foreground).