Class TestProcessingUnitRunnable
- java.lang.Object
-
- com.github.toolarium.processing.unit.runtime.runnable.impl.AbstractProcessingUnitRunnable
-
- com.github.toolarium.processing.unit.runtime.runnable.impl.ProcessingUnitRunnableImpl
-
- com.github.toolarium.processing.unit.runtime.test.TestProcessingUnitRunnable
-
- All Implemented Interfaces:
IProcessingUnitRunnable,java.lang.Runnable
public class TestProcessingUnitRunnable extends ProcessingUnitRunnableImpl
Implements aIProcessingUnitRunnablefor unit test cases
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedTestProcessingUnitRunnable(java.lang.Class<? extends IProcessingUnit> processingUnitClass, java.util.List<Parameter> parameterList, IProcessingUnitContext processingUnitContext)Constructor for TestProcessingUnitRunnable
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleanafterProcessUnit(boolean continueProcessing)Before process unit method callIProcessingUnitgetProcessingUnit()Get the processing unitintgetSuspendCounter()Gets the suspend countervoidsetMaxNumberOfSuspends(java.lang.Integer maxNumberOfSuspends)Set the max number of suspendsvoidsetNumberOfCyclesBeforeStop(java.lang.Integer numberOfCyclesBeforeStop)Set the number of cycles before stopvoidsetSuspendAfterCycles(java.lang.Long suspendAfterCycles)Set the number of cycles after the number of cycles it will suspendedvoidsetSuspendSleepTime(java.lang.Long suspendSleepTime)Set the suspend sleep time-
Methods inherited from class com.github.toolarium.processing.unit.runtime.runnable.impl.ProcessingUnitRunnableImpl
run
-
Methods inherited from class com.github.toolarium.processing.unit.runtime.runnable.impl.AbstractProcessingUnitRunnable
createProcessingUnitProxy, getId, getNumberOfUnitsToProcess, getParameterList, getProcessingProgress, getProcessingUnitContext, getProcessingUnitProxy, getProcessStatus, setProcessingUnitProxy
-
-
-
-
Constructor Detail
-
TestProcessingUnitRunnable
protected TestProcessingUnitRunnable(java.lang.Class<? extends IProcessingUnit> processingUnitClass, java.util.List<Parameter> parameterList, IProcessingUnitContext processingUnitContext)
Constructor for TestProcessingUnitRunnable- Parameters:
processingUnitClass- the processing unit classparameterList- the parameter listprocessingUnitContext- the processing unit context
-
-
Method Detail
-
setSuspendAfterCycles
public void setSuspendAfterCycles(java.lang.Long suspendAfterCycles)
Set the number of cycles after the number of cycles it will suspended- Parameters:
suspendAfterCycles- the number of cycles it will suspended
-
setSuspendSleepTime
public void setSuspendSleepTime(java.lang.Long suspendSleepTime)
Set the suspend sleep time- Parameters:
suspendSleepTime- the suspend sleep time
-
setMaxNumberOfSuspends
public void setMaxNumberOfSuspends(java.lang.Integer maxNumberOfSuspends)
Set the max number of suspends- Parameters:
maxNumberOfSuspends- the max number of suspends
-
setNumberOfCyclesBeforeStop
public void setNumberOfCyclesBeforeStop(java.lang.Integer numberOfCyclesBeforeStop)
Set the number of cycles before stop- Parameters:
numberOfCyclesBeforeStop- the number of cycles before stop
-
getSuspendCounter
public int getSuspendCounter()
Gets the suspend counter- Returns:
- the suspend counter
-
getProcessingUnit
public IProcessingUnit getProcessingUnit()
Get the processing unit- Returns:
- the processing unit
-
afterProcessUnit
protected boolean afterProcessUnit(boolean continueProcessing)
Description copied from class:AbstractProcessingUnitRunnableBefore process unit method call- Overrides:
afterProcessUnitin classAbstractProcessingUnitRunnable- Parameters:
continueProcessing- the continue processing- Returns:
- the continue processing
- See Also:
AbstractProcessingUnitRunnable.afterProcessUnit(boolean)
-
-