|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.cmu.sphinx.util.SimpleBatchManager
A simple implementation of the batch manager suitable for single threaded batch processing
Constructor Summary | |
SimpleBatchManager(java.lang.String filename,
int skip,
int whichBatch,
int totalBatches)
Constructs a SimpleBatchManager object. |
Method Summary | |
java.lang.String |
getFilename()
Returns the name of the file |
BatchItem |
getNextItem()
Gets the next available batch item or null if no more are available |
void |
start()
Starts processing the batch |
void |
stop()
Stops processing the batch |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SimpleBatchManager(java.lang.String filename, int skip, int whichBatch, int totalBatches)
filename
- the name of the batch fileskip
- number of records to skip between itemswhichBatch
- which chunk of the batch should we processtotalBatches
- the total number of chuncks that the batch
is divided into.Method Detail |
public void start() throws java.io.IOException
start
in interface BatchManager
java.io.IOException
- if an error occurs while processing the
batch filepublic BatchItem getNextItem() throws java.io.IOException
getNextItem
in interface BatchManager
java.io.IOException
- if an I/O error occurs while getting the
next item from the batch file.public void stop() throws java.io.IOException
stop
in interface BatchManager
java.io.IOException
- if an error occurs while processing the
batch filepublic java.lang.String getFilename()
getFilename
in interface BatchManager
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |