@Override public boolean hasNext() { findNext(); return nextValue != null; }
private synchronized void notifyIterationComplete() { if (lastInput != null) { if (conversionCallback != null) { conversionCallback.notifyIterationComplete(lastInput); } lastInput = null; } }
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 protected QueryRanges getRanges( final int maxRangeDecomposition, final double[] targetResolutionPerDimensionForHierarchicalIndex) { return DataStoreUtils.constraintsToQueryRanges( constraints, index.getIndexStrategy(), targetResolutionPerDimensionForHierarchicalIndex, maxRangeDecomposition, indexMetaData); } }
public boolean isRowMergingEnabled(final short internalAdapterId, final String indexId) { return DataAdapterAndIndexCache.getInstance( RowMergingAdapterOptionProvider.ROW_MERGING_ADAPTER_CACHE_ID, tableNamespace, HBaseStoreFactoryFamily.TYPE).add(internalAdapterId, indexId); }
default boolean mergeData( final Index index, final PersistentAdapterStore adapterStore, final InternalAdapterStore internalAdapterStore, final AdapterIndexMappingStore adapterIndexMappingStore, final Integer maxRangeDecomposition) { return DataStoreUtils.mergeData( this, maxRangeDecomposition, index, adapterStore, internalAdapterStore, adapterIndexMappingStore); }
@Override protected void findNext() { super.findNext(); final boolean hasNextValue = (nextValue != null); final T batchNextValue = batchHelper.postFindNext(hasNextValue, hasNextScannedResult()); if (!hasNextValue) { nextValue = batchNextValue; } } }
@Override public synchronized ConvertedType next() { while (!conversionQueue.hasNext() && inputIterator.hasNext()) { // fill conversion queue with converted objects from the next input final InputType input = inputIterator.next(); final Iterator<ConvertedType> conversions = converter.convert(input); lastInput = input; conversionQueue = conversions; } final ConvertedType retVal = conversionQueue.next(); if (!conversionQueue.hasNext() && (conversionCallback != null)) { // if the queue is empty, then notify that the last input had been // converted and iterated on notifyIterationComplete(); } return retVal; }
public static String setupPathingJarClassPath( final File dir, final Class context, final URL... additionalClasspathUrls) throws IOException { return setupPathingJarClassPath( new File(dir.getParentFile().getAbsolutePath() + File.separator + "pathing", "pathing.jar"), null, context, additionalClasspathUrls); }
/** * Resolve the specified generic type against the given TypeVariable map. * * @param genericType the generic type to resolve * @param typeVariableMap the TypeVariable Map to resolved against * @return the type if it resolves to a Class, or <code>Object.class</code> otherwise */ public static Class<?> resolveType(Type genericType, Map<TypeVariable<?>, Type> typeVariableMap) { Type rawType = getRawType(genericType, typeVariableMap); return (rawType instanceof Class ? (Class<?>) rawType : Object.class); }
default boolean mergeStats( final DataStatisticsStore statsStore, final InternalAdapterStore internalAdapterStore) { return DataStoreUtils.mergeStats(statsStore, internalAdapterStore); } }
@Override public boolean hasNext() { findNext(); return nextValue != null; }
/** * Resolve the type arguments of the given generic interface against the given target class which * is assumed to implement the generic interface and possibly declare concrete types for its type * variables. * * @param clazz the target class to check against * @param genericIfc the generic interface or superclass to resolve the type argument from * @return the resolved type of each argument, with the array size matching the number of actual * type arguments, or <code>null</code> if not resolvable */ public static Class<?>[] resolveTypeArguments(Class<?> clazz, Class<?> genericIfc) { return doResolveTypeArguments(clazz, clazz, genericIfc); }
@SuppressWarnings({"rawtypes", "unchecked"}) @Override public Iterator<T> apply(final Iterator<GeoWaveRow> input) { return new MergingEntryIterator( adapterStore, index, input, clientFilters, scanCallback, mergingAdapters, maxResolutionSubsamplingPerDimension, dataIndexRetrieval); } };
@Override public Iterator<T> apply(final Iterator<GeoWaveRow> rowIter) { return GeoWaveRowIteratorFactory.iterator( adapterStore, index, rowIter, clientFilters, scanCallback, fieldSubsetBitmask, maxResolutionSubsamplingPerDimension, decodePersistenceEncoding, dataIndexRetrieval); } }
public synchronized boolean add(final short internalAdapterId, final String indexId) { if (cache.contains(new DataAdapterAndIndex(internalAdapterId, indexId))) { return true; } else { cache.add(new DataAdapterAndIndex(internalAdapterId, indexId)); return false; } }
@Override public boolean hasNext() { batchHelper.preHasNext(); return super.hasNext(); }
@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); }