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 Summary
Fields Modifier and Type Field Description static String
LOCAL_PROCESS_CONTROL_TYPE
-
Constructor Summary
Constructors Constructor Description WorkerControlFactory()
-
Method Summary
Modifier and Type Method Description static WorkerControl
createWorkerControl(com.fishlib.io.logger.Logger log)
Main factory method to createWorkerControl
objectsstatic WorkerControl
createWorkerControlByName(com.fishlib.io.logger.Logger log, String workerControlType)
Main factory method to createWorkerControl
objectsstatic String
defaultWorkerControlType()
-
Field Details
-
Constructor Details
-
WorkerControlFactory
public WorkerControlFactory()
-
-
Method Details
-
createWorkerControl
Main factory method to createWorkerControl
objects- Parameters:
log
- The logger passed into the constructor of the workerControl implementation- Returns:
- An instance of
WorkerControl
-
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 createWorkerControl
objects- Parameters:
log
- The logger passed into the constructor of the workerControl implementationworkerControlType
- the friendly name of the worker control to create; seeLOCAL_PROCESS_CONTROL_TYPE
,DOCKER_SERVICE_CONTROL_TYPE
, andK8S_CONTROL_TYPE
.- Returns:
- An instance of
WorkerControl
-