public interface MCollection
extends java.io.Closeable
Modifier and Type | Method and Description |
---|---|
void |
close()
Close and release any resources.
|
CalendarDate |
extractDate(MFile mfile)
Use the date extractor to extract the date from the filename.
|
java.lang.Object |
getAuxInfo(java.lang.String key) |
java.lang.String |
getCollectionName()
The name of the collection
|
CloseableIterator<MFile> |
getFileIterator()
Get the current collection of MFile, no guaranteed order.
|
java.util.List<java.lang.String> |
getFilenames()
Sorted filename
|
java.lang.Iterable<MFile> |
getFilesSorted()
Get the current collection of MFile.
|
java.lang.String |
getIndexFilename() |
long |
getLastModified()
last time this collection was modified
|
MFile |
getLatestFile()
The latest file in the collection.
|
CalendarDate |
getPartitionDate()
The date to partition on, usually the starting date of the collection.
|
int |
getProtoIndex(int n)
Choose Proto dataset as index from [0..n-1], based on configuration.
|
java.lang.String |
getRoot()
Get common root directory of all MFiles in the collection - may be null
|
boolean |
hasDateExtractor()
Does this CollectionManager have the ability to extract a date from the MFile ?
|
void |
putAuxInfo(java.lang.String key,
java.lang.Object value) |
java.lang.String getCollectionName()
java.lang.String getRoot()
CalendarDate extractDate(MFile mfile)
mfile
- extract from hereboolean hasDateExtractor()
CalendarDate getPartitionDate()
void close()
close
in interface java.lang.AutoCloseable
close
in interface java.io.Closeable
int getProtoIndex(int n)
n
- size to choose fromlong getLastModified()
java.lang.String getIndexFilename()
java.lang.Iterable<MFile> getFilesSorted() throws java.io.IOException
java.io.IOException
java.util.List<java.lang.String> getFilenames() throws java.io.IOException
java.io.IOException
MFile getLatestFile() throws java.io.IOException
java.io.IOException
CloseableIterator<MFile> getFileIterator() throws java.io.IOException
try (CloseableIteratoriter = getFileIterator()) { while (iter.hasNext()) { MFile file = iter.next(); } }
java.io.IOException
java.lang.Object getAuxInfo(java.lang.String key)
void putAuxInfo(java.lang.String key, java.lang.Object value)