| Modifier and Type | Class and Description |
|---|---|
| private class | IndexCursorImpl.
Row iterator (by matching entry) for this cursor, modifiable. |
| private class | IndexCursorImpl.
Handles moving the table index cursor forward. |
| private abstract static class | IndexCursorImpl.
Handles moving the table index cursor in a given direction. |
| private static class | IndexCursorImpl.
Value object which maintains the current position of an IndexCursor. |
| private class | IndexCursorImpl.
Handles moving the table index cursor backward. |
| Modifier and Type | Field and Description |
|---|---|
| private static final Logger | |
| private final IndexData. | mentryCursor
Cursor over the entries of the relevant index |
| private final IndexCursorImpl. | mforwardDirHandler
IndexDirHandler for forward traversal |
| private final IndexImpl | mindex
logical index which this cursor is using |
| private Set | mindexEntryPattern
column names for the index entry columns |
| private final IndexCursorImpl. | mreverseDirHandler
IndexDirHandler for backward traversal |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static IndexCursorImpl | createCursor(TableImpl
the table over which this cursor will traverse _table, IndexImpl index for the table which will define traversal order as well as enhance certain lookups _index, Object[] the first row of data for the cursor, or _startRow, boolean null for the first entrywhether or not startRow is inclusive or exclusive _startInclusive, Object[] the last row of data for the cursor, or _endRow, boolean null for the last entrywhether or not endRow is inclusive or exclusive _endInclusive)Creates an indexed cursor for the given table, narrowed to the given range. |
| public boolean | currentRowMatchesEntry(Object... entryValues)
Implements io. Returns |
| private boolean | |
| public Iterator | |
| protected CursorImpl. | findAnotherPosition(TableImpl.
Implements abstract io. Finds the next non-deleted row after the given row (as defined by this cursor) and returns the id of the row,
where "next" may be backwards if moveForward is |
| protected boolean | findAnotherRowImpl(ColumnImpl columnPattern, Object valuePattern, boolean moveForward, ColumnMatcher columnMatcher, Object searchInfo)
Overrides io. Moves to the next row (as defined by the cursor) where the given column has the given value. |
| protected boolean | findAnotherRowImpl(Map<String, ?> rowPattern, boolean moveForward, ColumnMatcher columnMatcher, Object searchInfo)
Overrides io. Moves to the next row (as defined by the cursor) where the given columns have the given values. |
| public void | findClosestRowByEntry(Object... entryValues)
Implements io. Moves to the first row (as defined by the cursor) where the index entries are >= the given values. |
| public boolean | findFirstRowByEntry(Object... entryValues)
Implements io. Moves to the first row (as defined by the cursor) where the index entries match the given values. |
| pack-priv boolean | Returns: true if a valid row was found with the given values, false if no row was foundthe column values built from the index column values rowValues, boolean whether or not an exact match is desired requireMatch, ColumnMatcher columnMatcher)Moves to the first row (as defined by the cursor) where the index entries match the given values. |
| private boolean | |
| public Row | findRowByEntry(Object... entryValues)
Implements io. Finds the first row (as defined by the cursor) where the index entries match the given values. |
| protected ColumnMatcher | getDefaultColumnMatcher()
Overrides io. Returns the default ColumnMatcher for this Cursor. |
| protected IndexCursorImpl. | getDirHandler(boolean moveForward)
Implements abstract io. Returns the DirHandler for the given movement direction. |
| public IndexImpl | |
| private Set | |
| protected CursorImpl. | getRowPosition(RowIdImpl rowId)
Implements abstract io. Returns the appropriate position information for the given row (which is the current row and is valid). |
| protected boolean | isUpToDate()
Overrides io. Returns |
| protected boolean | keepSearching(ColumnMatcher columnMatcher, Object searchInfo)
Overrides io. Called by findAnotherRowImpl to determine if the search should continue after finding a row which does not match the current pattern. |
| public EntryIterableBuilder | newEntryIterable(Object... entryValues)
Implements io. Convenience method for constructing a new EntryIterableBuilder for this cursor. |
| protected Object | prepareSearchInfo(ColumnImpl columnPattern, Object valuePattern)
Overrides io. Called before a search commences to allow for search specific data to be generated (which is cached for re-use by the iterators). |
| protected Object | prepareSearchInfo(Map<String, ?> rowPattern)
Overrides io. Called before a search commences to allow for search specific data to be generated (which is cached for re-use by the iterators). |
| protected void | reset(boolean moveForward)
Overrides io. Resets this cursor for traversing the given direction. |
| protected void | restorePositionImpl(CursorImpl.
Overrides io. Restores a current and previous position for the cursor. |
| private Object[] |
| LOGGER | back to summary |
|---|---|
| private static final Logger LOGGER | |
| mentryCursor | back to summary |
|---|---|
| private final IndexData. Cursor over the entries of the relevant index | |
| mforwardDirHandler | back to summary |
|---|---|
| private final IndexCursorImpl. IndexDirHandler for forward traversal | |
| mindex | back to summary |
|---|---|
| private final IndexImpl mindex logical index which this cursor is using | |
| mindexEntryPattern | back to summary |
|---|---|
| private Set<String> mindexEntryPattern column names for the index entry columns | |
| mreverseDirHandler | back to summary |
|---|---|
| private final IndexCursorImpl. IndexDirHandler for backward traversal | |
| IndexCursorImpl | back to summary |
|---|---|
| private IndexCursorImpl(TableImpl _table, IndexImpl _index, IndexData. | |
| createCursor | back to summary |
|---|---|
| public static IndexCursorImpl createCursor(TableImpl _table, IndexImpl _index, Object[] _startRow, boolean _startInclusive, Object[] _endRow, boolean _endInclusive) throws IOException Creates an indexed cursor for the given table, narrowed to the given range.
Note, index based table traversal may not include all rows, as certain types of indexes do not include all
entries (namely, some indexes ignore null entries, see
| |
| currentRowMatchesEntry | back to summary |
|---|---|
| public boolean currentRowMatchesEntry(Object... entryValues) throws IOException Implements io. Doc from io. Returns
| |
| currentRowMatchesEntryImpl | back to summary |
|---|---|
| private boolean currentRowMatchesEntryImpl(Object[] rowValues, ColumnMatcher columnMatcher) throws IOException | |
| entryIterator | back to summary |
|---|---|
| public Iterator | |
| findAnotherPosition | back to summary |
|---|---|
| protected CursorImpl. Implements abstract io. Doc from io. Finds the next non-deleted row after the given row (as defined by this cursor) and returns the id of the row,
where "next" may be backwards if moveForward is
| |
| findAnotherRowImpl | back to summary |
|---|---|
| protected boolean findAnotherRowImpl(ColumnImpl columnPattern, Object valuePattern, boolean moveForward, ColumnMatcher columnMatcher, Object searchInfo) throws IOException Overrides io. Doc from io. Moves to the next row (as defined by the cursor) where the given column has the given value. Caller manages save/restore on failure. Default implementation scans the table from beginning to end.
| |
| findAnotherRowImpl | back to summary |
|---|---|
| protected boolean findAnotherRowImpl(Map<String, ?> rowPattern, boolean moveForward, ColumnMatcher columnMatcher, Object searchInfo) throws IOException Overrides io. Doc from io. Moves to the next row (as defined by the cursor) where the given columns have the given values. Caller manages save/restore on failure. Default implementation scans the table from beginning to end.
| |
| findClosestRowByEntry | back to summary |
|---|---|
| public void findClosestRowByEntry(Object... entryValues) throws IOException Implements io. Doc from io. Moves to the first row (as defined by the cursor) where the index entries are >= the given values. If a an exception is thrown, the cursor is restored to its previous state.
| |
| findFirstRowByEntry | back to summary |
|---|---|
| public boolean findFirstRowByEntry(Object... entryValues) throws IOException Implements io. Doc from io. Moves to the first row (as defined by the cursor) where the index entries match the given values. If a match is not found (or an exception is thrown), the cursor is restored to its previous state. Warning, this method always starts searching from the beginning of the Table (you cannot use it to find successive matches).
| |
| findFirstRowByEntryImpl | back to summary |
|---|---|
| pack-priv boolean findFirstRowByEntryImpl(Object[] rowValues, boolean requireMatch, ColumnMatcher columnMatcher) throws IOException Moves to the first row (as defined by the cursor) where the index entries match the given values. Caller manages save/restore on failure.
| |
| findPotentialRow | back to summary |
|---|---|
| private boolean findPotentialRow(Object[] rowValues, boolean requireMatch) throws IOException | |
| findRowByEntry | back to summary |
|---|---|
| public Row findRowByEntry(Object... entryValues) throws IOException Implements io. Doc from io. Finds the first row (as defined by the cursor) where the index entries match the given values. If a match is not found (or an exception is thrown), the cursor is restored to its previous state.
| |
| getDefaultColumnMatcher | back to summary |
|---|---|
| protected ColumnMatcher getDefaultColumnMatcher() Overrides io. Doc from io. Returns the default ColumnMatcher for this Cursor.
| |
| getDirHandler | back to summary |
|---|---|
| protected IndexCursorImpl. Implements abstract io. Doc from io. Returns the DirHandler for the given movement direction.
| |
| getIndex | back to summary |
|---|---|
| public IndexImpl getIndex() Implements io.
| |
| getIndexEntryPattern | back to summary |
|---|---|
| private Set | |
| getRowPosition | back to summary |
|---|---|
| protected CursorImpl. Implements abstract io. Doc from io. Returns the appropriate position information for the given row (which is the current row and is valid).
| |
| isUpToDate | back to summary |
|---|---|
| protected boolean isUpToDate() Overrides io. Doc from io. Returns
| |
| keepSearching | back to summary |
|---|---|
| protected boolean keepSearching(ColumnMatcher columnMatcher, Object searchInfo) throws IOException Overrides io. Doc from io. Called by findAnotherRowImpl to determine if the search should continue after finding a row which does not match the current pattern.
| |
| newEntryIterable | back to summary |
|---|---|
| public EntryIterableBuilder newEntryIterable(Object... entryValues) Implements io. Doc from io. Convenience method for constructing a new EntryIterableBuilder for this cursor. An EntryIterableBuilder provides a variety of options for more flexible iteration based on a specific index entry.
| |
| prepareSearchInfo | back to summary |
|---|---|
| protected Object prepareSearchInfo(ColumnImpl columnPattern, Object valuePattern) Overrides io. Doc from io. Called before a search commences to allow for search specific data to be generated (which is cached for re-use by the iterators).
| |
| prepareSearchInfo | back to summary |
|---|---|
| protected Object prepareSearchInfo(Map<String, ?> rowPattern) Overrides io. Doc from io. Called before a search commences to allow for search specific data to be generated (which is cached for re-use by the iterators).
| |
| reset | back to summary |
|---|---|
| protected void reset(boolean moveForward) Overrides io. Doc from io. Resets this cursor for traversing the given direction.
| |
| restorePositionImpl | back to summary |
|---|---|
| protected void restorePositionImpl(CursorImpl. Overrides io. Doc from io. Restores a current and previous position for the cursor.
| |
| toRowValues | back to summary |
|---|---|
| private Object[] toRowValues(Object[] entryValues) | |
| Modifier and Type | Field and Description |
|---|---|
| private final Object[] |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| protected boolean |
| mrowValues | back to summary |
|---|---|
| private final Object[] mrowValues | |
| EntryIterator | back to summary |
|---|---|
| private EntryIterator(Collection<String> _columnNames, Object[] _rowValues, ColumnMatcher columnMatcher) | |
| findNext | back to summary |
|---|---|
| protected boolean findNext() throws IOException Implements abstract io.
| |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public IndexData. | |
| public CursorImpl. | |
| public CursorImpl. | getEndPosition()
Implements abstract io.
|
| ForwardIndexDirHandler | back to summary |
|---|---|
| private ForwardIndexDirHandler() | |
| getAnotherEntry | back to summary |
|---|---|
| public IndexData. Implements abstract io.
| |
| getBeginningPosition | back to summary |
|---|---|
| public CursorImpl. Implements abstract io.
| |
| getEndPosition | back to summary |
|---|---|
| public CursorImpl. Implements abstract io.
| |
| Access | Constructor and Description |
|---|---|
| private |
| IndexDirHandler | back to summary |
|---|---|
| private IndexDirHandler() | |
| getAnotherEntry | back to summary |
|---|---|
| public abstract IndexData. | |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| protected boolean | equalsImpl(Object o)
Implements abstract io. Returns |
| public IndexData. | |
| public RowIdImpl | getRowId()
Implements abstract io. Implements io. Returns the unique RowId of the position of the cursor. |
| public String |
| entry | back to summary |
|---|---|
| private final IndexData. | |
| IndexPosition | back to summary |
|---|---|
| private IndexPosition(IndexData. | |
| equalsImpl | back to summary |
|---|---|
| protected boolean equalsImpl(Object o) Implements abstract io. Doc from io. Returns
| |
| getEntry | back to summary |
|---|---|
| public IndexData. | |
| getRowId | back to summary |
|---|---|
| public RowIdImpl getRowId() Implements abstract io. Implements io. Doc from io. Returns the unique RowId of the position of the cursor.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non-
| |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public IndexData. | |
| public CursorImpl. | |
| public CursorImpl. | getEndPosition()
Implements abstract io.
|
| ReverseIndexDirHandler | back to summary |
|---|---|
| private ReverseIndexDirHandler() | |
| getAnotherEntry | back to summary |
|---|---|
| public IndexData. Implements abstract io.
| |
| getBeginningPosition | back to summary |
|---|---|
| public CursorImpl. Implements abstract io.
| |
| getEndPosition | back to summary |
|---|---|
| public CursorImpl. Implements abstract io.
| |