Class InventoryBatchReader
java.lang.Object
gov.nasa.pds.registry.common.meta.InventoryBatchReader
- All Implemented Interfaces:
Closeable,AutoCloseable
A class to read records from collection inventory files in batches.
- Author:
- karpenko
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close the reader (input file).intreadNextBatch(int batchSize, ProdRefsBatch batch) Read next batch from a collection inventory file.
-
Constructor Details
-
InventoryBatchReader
Constructor- Parameters:
reader- Usually a file reader.refType- Primary or secondary product reference
-
-
Method Details
-
close
public void close()Close the reader (input file).- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
readNextBatch
Read next batch from a collection inventory file.- Parameters:
batchSize- Batch sizebatch- Store lid and lidvid references in this object (This is the output parameter)- Returns:
- number of records read.
- Throws:
Exception- Generic exception
-