Class TestProcessingUnitRunnable
- java.lang.Object
-
- com.github.toolarium.processing.unit.runtime.runnable.impl.AbstractProcessingUnitRunnable
-
- com.github.toolarium.processing.unit.runtime.runnable.impl.ProcessingUnitRunnable
-
- com.github.toolarium.processing.unit.runtime.test.TestProcessingUnitRunnable
-
- All Implemented Interfaces:
IProcessingUnitRunnable,java.lang.Runnable
public class TestProcessingUnitRunnable extends ProcessingUnitRunnable
Implements aIProcessingUnitRunnablefor unit test cases
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedTestProcessingUnitRunnable(byte[] suspendedState)Constructor for TestProcessingUnitRunnableprotectedTestProcessingUnitRunnable(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 unitcom.github.toolarium.common.bandwidth.IBandwidthThrottlinggetProcessingUnitThrottling()Get the processing unit throttlingvoidsetNumberOfCyclesBeforeStop(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 suspended-
Methods inherited from class com.github.toolarium.processing.unit.runtime.runnable.impl.ProcessingUnitRunnable
createProcessingUnitProxy, getSuspendedState, isThreadInterrupted, run, setMaxNumberOfProcessingUnitCallsPerSecond, suspendProcessing, throttlingProcessing, toString
-
Methods inherited from class com.github.toolarium.processing.unit.runtime.runnable.impl.AbstractProcessingUnitRunnable
getEmptyProcessingUnitHandler, getId, getMaxNumberOfProcessingUnitCallsPerSecond, getName, getParameterList, getProcessingActionStatus, getProcessingRuntimeStatus, getProcessingUnitClass, getProcessingUnitContext, getProcessingUnitProgress, getProcessingUnitProxy, getStatusMessageList, getTimeDifferenceFormatter, getTimeMeasurement, notifyProcessingUnitProgress, notifyProcessingUnitState, releaseResource, setEmptyProcessingUnitHandler, setProcessingActionStatus, setProcessingUnitProxy, setProcessingUnitRunnableListener
-
-
-
-
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
-
TestProcessingUnitRunnable
protected TestProcessingUnitRunnable(byte[] suspendedState)
Constructor for TestProcessingUnitRunnable- Parameters:
suspendedState- the suspended state
-
-
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
-
setNumberOfCyclesBeforeStop
public void setNumberOfCyclesBeforeStop(java.lang.Integer numberOfCyclesBeforeStop)
Set the number of cycles before stop- Parameters:
numberOfCyclesBeforeStop- the number of cycles before stop
-
getProcessingUnit
public IProcessingUnit getProcessingUnit()
Get the processing unit- Returns:
- the processing unit
-
getProcessingUnitThrottling
public com.github.toolarium.common.bandwidth.IBandwidthThrottling getProcessingUnitThrottling()
Description copied from class:ProcessingUnitRunnableGet the processing unit throttling- Overrides:
getProcessingUnitThrottlingin classProcessingUnitRunnable- Returns:
- the processing unit throttling
- See Also:
ProcessingUnitRunnable.getProcessingUnitThrottling()
-
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)
-
-