public interface MCollection extends 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.
|
Object |
getAuxInfo(String key) |
String |
getCollectionName()
The name of the collection
|
CloseableIterator<MFile> |
getFileIterator()
Get the current collection of MFile, no guaranteed order.
|
List<String> |
getFilenames()
Get list of sorted filenames that are in this collection.
|
Iterable<MFile> |
getFilesSorted()
Get the current collection of MFile.
|
String |
getIndexFilename(String suffix) |
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.
|
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(String key,
Object value) |
String getCollectionName()
String getRoot()
CalendarDate extractDate(MFile mfile)
mfile - extract from hereboolean hasDateExtractor()
CalendarDate getPartitionDate()
void close()
close in interface AutoCloseableclose in interface Closeableint getProtoIndex(int n)
n - size to choose fromlong getLastModified()
Iterable<MFile> getFilesSorted() throws IOException
IOExceptionList<String> getFilenames() throws IOException
IOExceptionMFile getLatestFile() throws IOException
IOExceptionCloseableIterator<MFile> getFileIterator() throws IOException
try (CloseableIteratoriter = getFileIterator()) { while (iter.hasNext()) { MFile file = iter.next(); } }
IOException