Class LocalProcessWorkerControlImpl

java.lang.Object
com.illumon.iris.db.tables.remotequery.process.LocalProcessWorkerControlImpl
All Implemented Interfaces:
WorkerControl

public class LocalProcessWorkerControlImpl extends Object implements WorkerControl
LocalProcessWorkerControlImpl is an implementation of the WorkerControl interface that launches a local operating system process using a Process class.
  • Constructor Details

    • LocalProcessWorkerControlImpl

      public LocalProcessWorkerControlImpl(com.fishlib.io.logger.Logger log)
      Constructor
      Parameters:
      log - THe Logger to use for logging
  • Method Details

    • createWorker

      public Worker createWorker(WorkerKind workerKind, String workerId, String processInfoId, List<WorkerProtocol> protocols, String userName, RemoteProcessingRequest request, File clientClassDirectory, com.fishlib.io.logger.Logger log, ProcessEventLogFormat2Logger processEventLogLogger, String dispatcherHostName, String dispatcherNameForDiscovery, IrisGroupProvider irisGroupProvider, @NotNull @NotNull Consumer<String> eventConsumer, @NotNull @NotNull Consumer<Worker> workerTerminationCallback)
      Description copied from interface: WorkerControl
      Construct a Worker with the specified request parameters needed to start the worker. Note: This create method should set up a data object only and not attempt to start or launch the Worker. Use the WorkerControl#startWorkerMethod() to start or launch the Workers
      Specified by:
      createWorker in interface WorkerControl
      Parameters:
      workerKind - WorkerKind for this worker
      workerId - A string representing the id for this worker, may not be unique
      processInfoId - A unique string representing the worker process
      protocols - The protocols implemented by this worker
      userName - The username of the requester
      request - The RemoteProcessingRequest specifying the processing characteristics
      clientClassDirectory - The directory for client classes
      log - The logger to use for logging
      processEventLogLogger - The process event logger
      dispatcherHostName - The dispatcher hostname
      dispatcherNameForDiscovery - The dispatcher discovery name
      irisGroupProvider - The group provider to allow for getting a user's groups
      eventConsumer - A method to be called to propagate any status events upon worker creation
      workerTerminationCallback - A method to be called when a worker terminates
      Returns:
      A Worker data object with attributes and settings of the Worker process
    • cleanupWorkers

      public void cleanupWorkers()
      Description copied from interface: WorkerControl
      Cleanup any Workers that that were not properly cleaned up from Dispatcher restarts. This method should be called when WorkerControl is created.
      Specified by:
      cleanupWorkers in interface WorkerControl