Class ActorScheduler

java.lang.Object
io.camunda.zeebe.scheduler.ActorScheduler
All Implemented Interfaces:
ActorSchedulingService, AutoCloseable

public final class ActorScheduler extends Object implements AutoCloseable, ActorSchedulingService
  • Constructor Details

  • Method Details

    • submitActor

      public ActorFuture<Void> submitActor(Actor actor)
      Submits a non-blocking, CPU-bound actor.
      Specified by:
      submitActor in interface ActorSchedulingService
      Parameters:
      actor - the actor to submit
    • submitActor

      public ActorFuture<Void> submitActor(Actor actor, SchedulingHints schedulingHints)
      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.
      Scheduling hints can be created using the SchedulingHints class.
      Specified by:
      submitActor in interface ActorSchedulingService
      Parameters:
      actor - the actor to submit
      schedulingHints - additional scheduling hint
    • start

      public void start()
    • stop

      public Future<Void> stop()
    • close

      public void close() throws Exception
      Convenience implementation for blocking stop which can be used with try-with-resources and other constructs.
      Specified by:
      close in interface AutoCloseable
      Throws:
      Exception
    • newActorScheduler

      public static ActorScheduler.ActorSchedulerBuilder newActorScheduler()