Class DefaultFileProcessingChain
- java.lang.Object
-
- ca.corefacility.bioinformatics.irida.processing.impl.DefaultFileProcessingChain
-
- All Implemented Interfaces:
FileProcessingChain
public class DefaultFileProcessingChain extends java.lang.Object implements FileProcessingChain
Default implementation ofFileProcessingChain. Simply iterates through a collection ofFileProcessor.
-
-
Constructor Summary
Constructors Constructor Description DefaultFileProcessingChain(SequencingObjectRepository sequencingObjectRepository, QCEntryRepository qcRepository, FileProcessor... fileProcessors)DefaultFileProcessingChain(SequencingObjectRepository sequencingObjectRepository, QCEntryRepository qcRepository, java.util.List<FileProcessor> fileProcessors)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<FileProcessor>getFileProcessors()Get the collection ofFileProcessorthat thisFileProcessingChainmanages.java.util.List<java.lang.Exception>launchChain(java.lang.Long sequencingObjectId)Launch the chain ofFileProcessoron the specificSequencingObject.voidsetFastFail(java.lang.Boolean fastFail)Set whether or not theFileProcessingChainshould fail on *all* exceptions.voidsetSleepDuration(java.lang.Integer sleepDuration)Set the amount of time (in seconds) that the processor chain should sleep each time it sleeps.voidsetTimeout(java.lang.Integer timeout)Set the total amount of time (in seconds) that the processor chain should wait for theSequencingObjectto appear before failing.
-
-
-
Constructor Detail
-
DefaultFileProcessingChain
public DefaultFileProcessingChain(SequencingObjectRepository sequencingObjectRepository, QCEntryRepository qcRepository, FileProcessor... fileProcessors)
-
DefaultFileProcessingChain
public DefaultFileProcessingChain(SequencingObjectRepository sequencingObjectRepository, QCEntryRepository qcRepository, java.util.List<FileProcessor> fileProcessors)
-
-
Method Detail
-
launchChain
public java.util.List<java.lang.Exception> launchChain(java.lang.Long sequencingObjectId) throws FileProcessorTimeoutExceptionLaunch the chain ofFileProcessoron the specificSequencingObject.- Specified by:
launchChainin interfaceFileProcessingChain- Parameters:
sequencingObjectId- the id of theSequencingObjectto process.- Returns:
- any
Exceptionthrown during chain processing (in the same order asFileProcessorreturned byFileProcessingChain.getFileProcessors()). - Throws:
FileProcessorTimeoutException- when the processor chain waits too long for the specifiedSequencingObjectto appear in the database.
-
getFileProcessors
public java.util.List<FileProcessor> getFileProcessors()
Get the collection ofFileProcessorthat thisFileProcessingChainmanages.- Specified by:
getFileProcessorsin interfaceFileProcessingChain- Returns:
- the
FileProcessorcollection managed by thisFileProcessingChain.
-
setFastFail
public void setFastFail(java.lang.Boolean fastFail)
Description copied from interface:FileProcessingChainSet whether or not theFileProcessingChainshould fail on *all* exceptions.- Specified by:
setFastFailin interfaceFileProcessingChain- Parameters:
fastFail- whether or not the chain should fail on exceptions.
-
setTimeout
public void setTimeout(java.lang.Integer timeout)
Set the total amount of time (in seconds) that the processor chain should wait for theSequencingObjectto appear before failing.- Specified by:
setTimeoutin interfaceFileProcessingChain- Parameters:
timeout- the total amount of time in seconds that the processor chain should wait.
-
setSleepDuration
public void setSleepDuration(java.lang.Integer sleepDuration)
Set the amount of time (in seconds) that the processor chain should sleep each time it sleeps.- Specified by:
setSleepDurationin interfaceFileProcessingChain- Parameters:
sleepDuration- the amount of time in seconds that the processor chain should wait.
-
-