Class WorkerControlFactory
java.lang.Object
com.illumon.iris.db.tables.remotequery.WorkerControlFactory
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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic WorkerControlcreateWorkerControl(com.fishlib.io.logger.Logger log) Main factory method to createWorkerControlobjectsstatic WorkerControlcreateWorkerControlByName(com.fishlib.io.logger.Logger log, String workerControlType) Main factory method to createWorkerControlobjectsstatic String
-
Field Details
-
LOCAL_PROCESS_CONTROL_TYPE
- See Also:
-
LOCAL_PROCESS_WORKER_CONTROL_CLASS_NAME
- See Also:
-
DOCKER_SERVICE_CONTROL_TYPE
- See Also:
-
DOCKER_SERVICE_WORKER_CONTROL_CLASS_NAME
- See Also:
-
K8S_CONTROL_TYPE
- See Also:
-
K8S_WORKER_CONTROL_CLASS_NAME
- See Also:
-
WORKER_CONTROL_TYPE_PROPERTY
- See Also:
-
DEFAULT_WORKER_CONTROL_TYPE
- See Also:
-
-
Constructor Details
-
WorkerControlFactory
public WorkerControlFactory()
-
-
Method Details
-
createWorkerControl
Main factory method to createWorkerControlobjects- 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 createWorkerControlobjects- 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
-