protected void findNext() { while ((nextValue == null) && hasNextScannedResult()) { final GeoWaveRow row = getNextEncodedResult(); final T decodedValue = decodeRow(row, clientFilters, index); if (decodedValue != null) { nextValue = decodedValue; return; } } }
@Override public boolean hasNext() { findNext(); return nextValue != null; }
public NativeEntryIteratorWrapper( final PersistentAdapterStore adapterStore, final Index index, final Iterator<GeoWaveRow> scannerIt, final QueryFilter[] clientFilters, final ScanCallback<T, ? extends GeoWaveRow> scanCallback, final byte[] fieldSubsetBitmask, final double[] maxResolutionSubsamplingPerDimension, final boolean decodePersistenceEncoding, final DataIndexRetrieval dataIndexRetrieval) { this.adapterStore = adapterStore; this.index = index; this.scannerIt = scannerIt; this.clientFilters = clientFilters; this.scanCallback = scanCallback; this.fieldSubsetBitmask = fieldSubsetBitmask; this.decodePersistenceEncoding = decodePersistenceEncoding; this.dataIndexRetrieval = dataIndexRetrieval; initializeBitPosition(maxResolutionSubsamplingPerDimension); }
@SuppressWarnings("unchecked") protected T decodeRow( final GeoWaveRow row, final QueryFilter[] clientFilters, final Index index) { Object decodedRow = null; if (adapterValid && ((bitPosition == null) || passesSkipFilter(row))) { try { decodedRow = BaseDataStoreUtils.decodeRow( row, clientFilters, null, adapterStore, index, scanCallback, fieldSubsetBitmask, decodePersistenceEncoding, dataIndexRetrieval); if (decodedRow != null) { incrementSkipRow(row); } } catch (final AdapterException e) { adapterValid = false; // Attempting to decode future rows with the same adapter is // pointless. } } return (T) decodedRow; }
@Override protected T decodeRow( final GeoWaveRow row, final QueryFilter[] clientFilters, final Index index) { final T retVal = super.decodeRow(row, clientFilters, index); return batchHelper.postDecodeRow(retVal); }
@Override public boolean hasNext() { batchHelper.preHasNext(); return super.hasNext(); }
(BatchDataIndexRetrieval) dataIndexRetrieval); return new NativeEntryIteratorWrapper<>( adapterStore, index,
@Override public T next() throws NoSuchElementException { if (nextValue == null) { findNext(); } final T previousNext = nextValue; if (nextValue == null) { throw new NoSuchElementException(); } nextValue = null; return previousNext; }
@Override protected void findNext() { super.findNext(); final boolean hasNextValue = (nextValue != null); final T batchNextValue = batchHelper.postFindNext(hasNextValue, hasNextScannedResult()); if (!hasNextValue) { nextValue = batchNextValue; } } }