Klasse SequencerMediator
java.lang.Object
ch.nolix.core.programcontrol.flowcontrol.SequencerMediator
- Version:
- 2020-08-15
- Autor:
- Silvan Wyss
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungasLongAs(BooleanSupplier condition) asSoonAs(BooleanSupplier condition) asSoonAsNoMore(BooleanSupplier condition) Enqueues the given job.forCount(int maxRunCount) forMaxMilliseconds(int maxDurationInMilliseconds) forMaxSeconds(int maxDurationInSeconds) runInBackground(Runnable job) Runs the given job in background.<R> ResultFuture<R> runInBackground(Supplier<R> resultJob) Runs the given result job in background.until(BooleanSupplier condition) voidwaitAsLongAs(BooleanSupplier condition) Waits as long as the given condition is fulfilled.voidwaitForMilliseconds(int durationInMilliseconds) Waits for the given durationInMilliseconds.voidwaitForSeconds(int durationInSeconds) Waits for the given durationInSeconds.voidwaitUntil(BooleanSupplier condition) Waits until the given condition is fulfilled.
-
Konstruktordetails
-
SequencerMediator
public SequencerMediator()
-
-
Methodendetails
-
asLongAs
- Parameter:
condition-- Gibt zurück:
- a new
AsLongAsMediatorwith the given condition. - Löst aus:
ArgumentIsNullException- if the given condition is null.
-
asSoonAs
- Parameter:
condition-- Gibt zurück:
- a new
AsSoonAsMediatorwith the given condition. - Löst aus:
ArgumentIsNullException- if the given condition is null.
-
asSoonAsNoMore
- Parameter:
condition-- Gibt zurück:
- a new
AsSoonAsMediatorwith the negation of the given condition. - Löst aus:
ArgumentIsNullException- if the given condition is null.
-
enqueue
Enqueues the given job.- Parameter:
job-- Gibt zurück:
- a
IFuturefor the given job. - Löst aus:
ArgumentIsNullException- if the given job is null.
-
forCount
- Parameter:
maxRunCount-- Gibt zurück:
- a new
ForCountMediatorwith the given max run count. - Löst aus:
NegativeArgumentException- if the given max run count is negative.
-
forMaxMilliseconds
- Parameter:
maxDurationInMilliseconds-- Gibt zurück:
- a new
ForMaxMillisecondsMediatorfor the given maxDurationInMilliseconds. - Löst aus:
NegativeArgumentException- if the given maxDurationInMilliseconds is negative.
-
forMaxSeconds
- Parameter:
maxDurationInSeconds-- Gibt zurück:
- a new
ForMaxMillisecondsMediatorfor the given maxDurationInSeconds. - Löst aus:
NegativeArgumentException- if the given maxDurationInSeconds is negative.
-
runInBackground
Runs the given job in background.- Parameter:
job-- Gibt zurück:
- a new
Future. - Löst aus:
ArgumentIsNullException- if the given job is null.
-
runInBackground
Runs the given result job in background. A result job is a job that returns a result.- Typparameter:
R- is the type of the result the given resultJob returns.- Parameter:
resultJob-- Gibt zurück:
- a new
ResultFuture. - Löst aus:
ArgumentIsNullException- if the given result job is null.
-
until
- Parameter:
condition-- Gibt zurück:
- a new
AsLongAsMediatorfor the negation of the given condition. - Löst aus:
ArgumentIsNullException- if the given condition is null.
-
waitAsLongAs
Waits as long as the given condition is fulfilled.- Parameter:
condition-- Löst aus:
ArgumentIsNullException- if the given condition is null.
-
waitForMilliseconds
public void waitForMilliseconds(int durationInMilliseconds) Waits for the given durationInMilliseconds.- Parameter:
durationInMilliseconds-- Löst aus:
NegativeArgumentException- if the given durationInMilliseconds is negative.
-
waitForSeconds
public void waitForSeconds(int durationInSeconds) Waits for the given durationInSeconds.- Parameter:
durationInSeconds-- Löst aus:
NegativeArgumentException- if the given durationInSeconds is negative.
-
waitUntil
Waits until the given condition is fulfilled.- Parameter:
condition-- Löst aus:
ArgumentIsNullException- if the given condition is null.
-