Package io.camunda.zeebe.scheduler
Interface ConcurrencyControl
- All Known Implementing Classes:
Actor,ActorControl
public interface ConcurrencyControl
Control interface to schedule tasks or follow-up tasks such that different tasks scheduled via
the same
ConcurrencyControl object are never executed concurrently-
Method Summary
Modifier and TypeMethodDescriptiondefault <V> ActorFuture<V>Create a new completed future objectdefault <V> ActorFuture<V>Create a new future objectvoidSchedules an action to be invoked (must be called from an actor thread)<T> voidrunOnCompletion(ActorFuture<T> future, BiConsumer<T, Throwable> callback) Schedules a callback to be invoked after the future has completed
-
Method Details
-
runOnCompletion
Schedules a callback to be invoked after the future has completed- Type Parameters:
T- result type of the future- Parameters:
future- the future whose completion is awaitedcallback- the callback to call after the future has completed
-
run
Schedules an action to be invoked (must be called from an actor thread)- Parameters:
action- action to be invoked
-
createFuture
Create a new future object- Type Parameters:
V- value type of future- Returns:
- new future object
-
createCompletedFuture
Create a new completed future object- Type Parameters:
V- value type of future- Returns:
- new completed future object
-