Class ControllerDispatcherHandler

java.lang.Object
com.illumon.iris.controller.ControllerDispatcherHandler

public class ControllerDispatcherHandler extends Object
Class to handle dispatcher details. One of these will be created for each dispatcher. We rely on the dispatcher to tell us its current values when something changes. The only exception is that when a PQ is starting, we'll internally account for it before the dispatcher is aware of any changes; this is to ensure that when multiple PQs start at the same time, we can let a server selection provider know server utilization immediately.
  • Method Details

    • preventReconnection

      public void preventReconnection()
      Prevent any reconnection attempts. Useful when the controller is shutting down.
    • updateServerUsageFromInternalEvent

      public void updateServerUsageFromInternalEvent(PersistentQueryConfiguration config, boolean starting, String workerProcessInfoId)
      Update accounting from an internal PQ event. This is always a PQ that's about to start, or a PQ that failed to start, possibly before even getting to the dispatcher (so there won't be a dispatcher accounting event for it). There will always be a notification for a PQ before it starts. If the PQ fails to start, the notification may come from an internal event, the dispatcher, or possibly both.
      Parameters:
      config - the PQ configuration
      starting - true if it's starting, false if it failed to start
      workerProcessInfoId - the processInfoId of the worker
    • onWorkerCompletion

      public void onWorkerCompletion(PersistentQueryConfiguration config, String workerProcessInfoId)
      When a worker is completed after startup, we need to be able to mark it as complete.
      Parameters:
      config - the persistent query configuration
      workerProcessInfoId - the process info ID of the worker
    • isConnected

      public boolean isConnected()
      Is this dispatcher connected?
    • getConnection

      @Nullable public QueryDispatcherConnection getConnection()
    • getOneShotConnectionOrNull

      public QueryDispatcherConnection getOneShotConnectionOrNull()
    • getDbConnectionMonitorParams

      @NotNull public io.deephaven.enterprise.comm.ConnectionMonitor.Params getDbConnectionMonitorParams()
    • getConfig

      public PersistentQueryDbServerConfig getConfig()