Class ForCountMediator
java.lang.Object
ch.nolix.base.programcontrol.flowcontrol.ForCountMediator
- All Implemented Interfaces:
IForCountMediator
A
ForCountMediator is not mutable.- Author:
- Silvan Wyss
-
Method Summary
Modifier and TypeMethodDescriptionstatic ForCountMediatorforMaxRunCount(int maxRunCount) voidLets the currentIForCountMediatorrun the given job.voidrun(IntConsumer job) Lets the currentIForCountMediatorrun the given job.runInBackground(Runnable step) Lets the currentIForCountMediatorrun the given job in background.
-
Method Details
-
forMaxRunCount
- Parameters:
maxRunCount-- Returns:
- a new
ForCountMediatorwith the given maxRunCount. - Throws:
RuntimeException- if the given maxRunCount is negative.
-
run
Lets the currentIForCountMediatorrun the given job.- Specified by:
runin interfaceIForCountMediator- Parameters:
job-
-
run
Lets the currentIForCountMediatorrun the given job.- Specified by:
runin interfaceIForCountMediator- Parameters:
job-
-
runInBackground
Lets the currentIForCountMediatorrun the given job in background.- Specified by:
runInBackgroundin interfaceIForCountMediator- Parameters:
step-- Returns:
- a new
IFuturefor the job execution.
-