Package thredds.inventory.partition
Class TimePartition
- java.lang.Object
-
- thredds.inventory.CollectionAbstract
-
- thredds.inventory.CollectionPathMatcher
-
- thredds.inventory.partition.TimePartition
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
,MCollection
,PartitionManager
public class TimePartition extends CollectionPathMatcher implements PartitionManager
Partition the files by a user-defined time period. The date is extracted from the filename using the non-optional dateExtractor. All filenames must be read into memory at once, then partitioned.- Since:
- 12/23/2014
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class thredds.inventory.CollectionAbstract
CollectionAbstract.DateSorter, CollectionAbstract.MyStreamFilter
-
-
Field Summary
-
Fields inherited from class thredds.inventory.CollectionPathMatcher
config
-
Fields inherited from class thredds.inventory.CollectionAbstract
auxInfo, CATALOG, collectionName, dateExtractor, DIR, FILE, GLOB, lastModified, LIST, logger, protoChoice, root, sfilter, startCollection
-
-
Constructor Summary
Constructors Constructor Description TimePartition(FeatureCollectionConfig config, CollectionSpecParserAbstract specp, org.slf4j.Logger logger)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Iterable<MCollection>
makePartitions(CollectionUpdateType forceCollection)
void
removePartition(MCollection partition)
-
Methods inherited from class thredds.inventory.CollectionPathMatcher
close, getFileIterator, getFilesSorted
-
Methods inherited from class thredds.inventory.CollectionAbstract
cleanName, extractDate, getAuxInfo, getCollectionName, getFilenames, getIndexFilename, getLastModified, getLatestFile, getPartitionDate, getProtoIndex, getRoot, hasDateExtractor, makeFileListSorted, open, parseOlderThanString, putAuxInfo, setDateExtractor, setRoot, setStreamFilter
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface thredds.inventory.MCollection
close, extractDate, getAuxInfo, getCollectionName, getFileIterator, getFilenames, getFilesSorted, getIndexFilename, getLastModified, getLatestFile, getPartitionDate, getProtoIndex, getRoot, hasDateExtractor, putAuxInfo
-
-
-
-
Constructor Detail
-
TimePartition
public TimePartition(FeatureCollectionConfig config, CollectionSpecParserAbstract specp, org.slf4j.Logger logger)
-
-
Method Detail
-
makePartitions
public Iterable<MCollection> makePartitions(CollectionUpdateType forceCollection) throws IOException
- Specified by:
makePartitions
in interfacePartitionManager
- Throws:
IOException
-
removePartition
public void removePartition(MCollection partition)
- Specified by:
removePartition
in interfacePartitionManager
-
-