/** * Iterates over the entire stream of data. * * @return An iterator for reading objects from the data store. This * iterator must be released after use. */ public Iterator<T> iterate() { return iterate(0); }
/** * Iterates over the entire stream of data. * * @return An iterator for reading objects from the data store. This * iterator must be released after use. */ public Iterator<T> iterate() { return iterate(0); }
/** * Returns all elements in the range specified by the begin and end keys. * All elements with keys matching and lying between the two keys will be * returned. * * @param beginKey * The key marking the beginning of the required index elements. * @param endKey * The key marking the end of the required index elements. The * identifier for the index element to be retrieved. * @return An iterator pointing to the requested range. */ public Iterator<T> getRange(K beginKey, K endKey) { long keyIndex; // Determine the location of the begin key within the index. keyIndex = getKeyIndex(beginKey); // Iterate across the range. return new IndexRangeIterator<K, T>( indexStoreReader.iterate(keyIndex * elementSize), beginKey, endKey, ordering ); }
/** * Returns all elements in the range specified by the begin and end keys. * All elements with keys matching and lying between the two keys will be * returned. * * @param beginKey * The key marking the beginning of the required index elements. * @param endKey * The key marking the end of the required index elements. The * identifier for the index element to be retrieved. * @return An iterator pointing to the requested range. */ public Iterator<T> getRange(K beginKey, K endKey) { long keyIndex; // Determine the location of the begin key within the index. keyIndex = getKeyIndex(beginKey); // Iterate across the range. return new IndexRangeIterator<K, T>( indexStoreReader.iterate(keyIndex * elementSize), beginKey, endKey, ordering ); }
Iterator<T> indexIterator; indexIterator = indexStoreReader.iterate();
Iterator<T> indexIterator; indexIterator = indexStoreReader.iterate();