Class HeartbeatManager

java.lang.Object
io.temporal.internal.worker.HeartbeatManager

public class HeartbeatManager extends Object
Manages periodic worker heartbeat RPCs. Routes workers to per-namespace HeartbeatManager.SharedNamespaceWorker instances, each with its own scheduler.
  • Constructor Details

    • HeartbeatManager

      public HeartbeatManager(io.temporal.serviceclient.WorkflowServiceStubs service, String identity, Duration interval)
  • Method Details

    • registerWorker

      public void registerWorker(String namespace, String workerInstanceKey, Supplier<io.temporal.api.worker.v1.WorkerHeartbeat> callback)
      Register a worker's heartbeat callback. Creates a per-namespace SharedNamespaceWorker if this is the first worker for the given namespace.
    • unregisterWorker

      public void unregisterWorker(String namespace, String workerInstanceKey)
      Unregister a worker. Stops the namespace worker if no workers remain for that namespace.
    • shutdown

      public void shutdown()