Package io.camunda.zeebe.scheduler
Class ActorScheduler
java.lang.Object
io.camunda.zeebe.scheduler.ActorScheduler
- All Implemented Interfaces:
ActorSchedulingService,AutoCloseable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic interfacestatic final class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Convenience implementation for blocking stop which can be used with try-with-resources and other constructs.voidstart()stop()submitActor(Actor actor) Submits a non-blocking, CPU-bound actor.submitActor(Actor actor, SchedulingHints schedulingHints) Submits an actor providing hints to the scheduler about how to best schedule the actor.
-
Constructor Details
-
ActorScheduler
-
-
Method Details
-
submitActor
Submits a non-blocking, CPU-bound actor.- Specified by:
submitActorin interfaceActorSchedulingService- Parameters:
actor- the actor to submit
-
submitActor
Submits an actor providing hints to the scheduler about how to best schedule the actor. Actors must always be non-blocking. On top of that, the scheduler distinguishes- CPU-bound actors: actors which perform no or very little blocking I/O. It is possible to specify a priority.
- I/O-bound actors: actors where the runtime is dominated by performing blocking I/O (usually filesystem writes). It is possible to specify the I/O device used by the actor.
SchedulingHintsclass.- Specified by:
submitActorin interfaceActorSchedulingService- Parameters:
actor- the actor to submitschedulingHints- additional scheduling hint
-
start
public void start() -
stop
-
close
Convenience implementation for blocking stop which can be used with try-with-resources and other constructs.- Specified by:
closein interfaceAutoCloseable- Throws:
Exception
-
newActorScheduler
-