Class WorkerControlFactory

java.lang.Object
com.illumon.iris.db.tables.remotequery.WorkerControlFactory

public class WorkerControlFactory extends Object
Factory for creating WorkerControl implementations. This factory uses reflection to avoid circular dependencies as the implementing classes are defined in the :WorkerProcess module that depend on this :DB module. The factory uses a Configuration property RemoteQueryDispatcher.workerControlTypeto determine which WorkerControl to create (instantiate). The factory will create a Local Process WorkerControl by default. Currently, this factory supports LocalProcess and DockerService WorkerControl types. To add additional WorkerControl types, add the fully qualified class name and corresponding configuration property to this class.
  • Field Details

  • Constructor Details

    • WorkerControlFactory

      public WorkerControlFactory()
  • Method Details

    • createWorkerControl

      public static WorkerControl createWorkerControl(@NotNull com.fishlib.io.logger.Logger log)
      Main factory method to create WorkerControl objects
      Parameters:
      log - The logger passed into the constructor of the workerControl implementation
      Returns:
      An instance of WorkerControl
    • defaultWorkerControlType

      public static String defaultWorkerControlType()
      Returns:
      the default worker control type for Deephaven enterprise workers.
    • createWorkerControlByName

      public static WorkerControl createWorkerControlByName(@NotNull com.fishlib.io.logger.Logger log, @NotNull String workerControlType)
      Main factory method to create WorkerControl objects
      Parameters:
      log - The logger passed into the constructor of the workerControl implementation
      workerControlType - the friendly name of the worker control to create; see LOCAL_PROCESS_CONTROL_TYPE, DOCKER_SERVICE_CONTROL_TYPE, and K8S_CONTROL_TYPE.
      Returns:
      An instance of WorkerControl