ChunkFileIterator Class Reference

Inheritance diagram for ChunkFileIterator:
Collaboration diagram for ChunkFileIterator:

List of all members.

Detailed Description

An Iterator which iterates over files of a DataStore. The different constructors are designed to reduce the number of files to visit, as, for instance, the signalId or the range of a search can be defined.


Public Methods

 ChunkFileIterator (DataStore dataStore, String signal, int chunkId, SearchMask<?> mask) throws DataStoreException
ChunkFileIterator copy () throws DataStoreException
int getNumberOfFiles ()
boolean iterateSignals ()
boolean hasNext ()
File next ()
final void remove ()
void removeNotMatchingConstraints (Range anchorConstraint, ChunkCache chunkCache)

Package Attributes

final FileFilter chunkFilter
final Comparator< File > fileComparator


ChunkFileIterator ( DataStore  dataStore,
String  signal,
int  chunkId,
SearchMask<?>  mask 
) throws DataStoreException

Method Details

int getNumberOfFiles ( )
boolean hasNext ( )
boolean iterateSignals ( )
File next ( )
final void remove ( )
void removeNotMatchingConstraints ( Range  anchorConstraint,
ChunkCache  chunkCache 

Field Details

final FileFilter chunkFilter [package]
Initial value:
 new FileFilter() {
                public boolean accept(final File pathname) {
                        return pathname.isFile() && pathname.getName().endsWith(".data");
final Comparator<File> fileComparator [package]
Initial value:
 new Comparator<File>() {
                public int compare(final File o1, final File o2) { 
                        if(o1.isDirectory()) return o1.compareTo(o2);
                        String s1 = o1.getName().substring(0, o1.getName().indexOf('.'));
                        String s2 = o2.getName().substring(0, o2.getName().indexOf('.'));
                        return Integer.parseInt(s1) - Integer.parseInt(s2);