public class PartitionManagerFromIndexDirectory extends CollectionAbstract implements PartitionManager
CollectionAbstract.DateSorter, CollectionAbstract.MyStreamFilter
auxInfo, CATALOG, collectionName, dateExtractor, DIR, FILE, GLOB, lastModified, LIST, logger, NCX_SUFFIX, protoChoice, root, sfilter, startCollection
Constructor and Description |
---|
PartitionManagerFromIndexDirectory(java.lang.String name,
FeatureCollectionConfig config,
java.io.File directory,
org.slf4j.Logger logger) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Close and release any resources.
|
CloseableIterator<MFile> |
getFileIterator()
Get the current collection of MFile, no guaranteed order.
|
java.lang.Iterable<MFile> |
getFilesSorted()
Get the current collection of MFile.
|
java.lang.Iterable<MCollection> |
makePartitions(CollectionUpdateType forceCollection) |
void |
removePartition(MCollection partition) |
cleanName, extractDate, getAuxInfo, getCollectionName, getFilenames, getIndexFilename, getLastModified, getLatestFile, getPartitionDate, getProtoIndex, getRoot, hasDateExtractor, makeFileListSorted, open, parseOlderThanString, putAuxInfo, setDateExtractor, setRoot, setStreamFilter
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
extractDate, getAuxInfo, getCollectionName, getFilenames, getIndexFilename, getLastModified, getLatestFile, getPartitionDate, getProtoIndex, getRoot, hasDateExtractor, putAuxInfo
public PartitionManagerFromIndexDirectory(java.lang.String name, FeatureCollectionConfig config, java.io.File directory, org.slf4j.Logger logger)
public java.lang.Iterable<MCollection> makePartitions(CollectionUpdateType forceCollection) throws java.io.IOException
makePartitions
in interface PartitionManager
java.io.IOException
public void close()
MCollection
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in interface MCollection
public java.lang.Iterable<MFile> getFilesSorted() throws java.io.IOException
MCollection
getFilesSorted
in interface MCollection
java.io.IOException
public CloseableIterator<MFile> getFileIterator() throws java.io.IOException
MCollection
try (CloseableIteratoriter = getFileIterator()) { while (iter.hasNext()) { MFile file = iter.next(); } }
getFileIterator
in interface MCollection
java.io.IOException
public void removePartition(MCollection partition)
removePartition
in interface PartitionManager