|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
public interface IndexLookupBatch
Support for asynchronous batched lookups in indexes. The flow is the
following: H2 engine will be calling
addSearchRows(SearchRow, SearchRow) until method
isBatchFull() will return true or there are no more search
rows to add. Then method find() will be called to execute batched
lookup. Note that a single instance of IndexLookupBatch can be reused
for multiple sequential batched lookups, moreover it can be reused for
multiple queries for the same prepared statement.
Index.createLookupBatch(org.h2.table.TableFilter)| Method Summary | |
|---|---|
boolean |
addSearchRows(SearchRow first,
SearchRow last)
Add search row pair to the batch. |
java.util.List<java.util.concurrent.Future<Cursor>> |
find()
Execute batched lookup and return future cursor for each provided search row pair. |
java.lang.String |
getPlanSQL()
Get plan for EXPLAIN. |
boolean |
isBatchFull()
Check if this batch is full. |
void |
reset(boolean beforeQuery)
Reset this batch to clear state. |
| Method Detail |
|---|
boolean addSearchRows(SearchRow first,
SearchRow last)
first - the first row, or null for no limitlast - the last row, or null for no limit
false if this search row pair is known to produce no
results and thus the given row pair was not addedIndex.find(org.h2.table.TableFilter, SearchRow, SearchRow)boolean isBatchFull()
true If batch is full, will not accept any
more rows and find() can be executed.java.util.List<java.util.concurrent.Future<Cursor>> find()
addSearchRows(SearchRow, SearchRow) calls has been done before
find() call exactly in the same order.
java.lang.String getPlanSQL()
void reset(boolean beforeQuery)
beforeQuery - if it is being called before query execution
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||