Class WorkerServiceWithClassLoader

java.lang.Object
org.apache.pulsar.functions.worker.service.WorkerServiceWithClassLoader
All Implemented Interfaces:
WorkerService

public class WorkerServiceWithClassLoader extends Object implements WorkerService
A worker service with its classloader.
  • Constructor Details

    • WorkerServiceWithClassLoader

      public WorkerServiceWithClassLoader()
  • Method Details

    • getWorkerConfig

      public org.apache.pulsar.functions.worker.WorkerConfig getWorkerConfig()
      Description copied from interface: WorkerService
      Return the worker config.
      Specified by:
      getWorkerConfig in interface WorkerService
      Returns:
      worker config
    • initAsStandalone

      public void initAsStandalone(org.apache.pulsar.functions.worker.WorkerConfig workerConfig) throws Exception
      Description copied from interface: WorkerService
      Initialize the worker API service using the provided config.
      Specified by:
      initAsStandalone in interface WorkerService
      Parameters:
      workerConfig - the worker config
      Throws:
      Exception - when fail to initialize the worker API service.
    • initInBroker

      public void initInBroker(org.apache.pulsar.broker.ServiceConfiguration brokerConfig, org.apache.pulsar.functions.worker.WorkerConfig workerConfig, org.apache.pulsar.broker.resources.PulsarResources pulsarResources, org.apache.pulsar.common.conf.InternalConfigurationData internalConf) throws Exception
      Description copied from interface: WorkerService
      Initialize the worker service in broker.
      Specified by:
      initInBroker in interface WorkerService
      Parameters:
      brokerConfig - broker config
      workerConfig - worker config
      pulsarResources - configuration metadata-store
      internalConf - pulsar internal configuration data
      Throws:
      Exception - when failed to initialize the worker service in broker.
    • start

      public void start(org.apache.pulsar.broker.authentication.AuthenticationService authenticationService, org.apache.pulsar.broker.authorization.AuthorizationService authorizationService, ErrorNotifier errorNotifier) throws Exception
      Description copied from interface: WorkerService
      Start the worker API service.
      Specified by:
      start in interface WorkerService
      Parameters:
      authenticationService - the authentication service.
      authorizationService - the authorization service.
      errorNotifier - error notifier.
      Throws:
      Exception - when fail to start the worker API service.
    • stop

      public void stop()
      Description copied from interface: WorkerService
      Stop the worker API service.
      Specified by:
      stop in interface WorkerService
    • isInitialized

      public boolean isInitialized()
      Description copied from interface: WorkerService
      Check if the worker service is initialized or not.
      Specified by:
      isInitialized in interface WorkerService
      Returns:
      true if the worker service is initialized otherwise false.
    • getFunctions

      public Functions<? extends WorkerService> getFunctions()
      Description copied from interface: WorkerService
      Get the functions service.
      Specified by:
      getFunctions in interface WorkerService
      Returns:
      the functions service.
    • getFunctionsV2

      public FunctionsV2<? extends WorkerService> getFunctionsV2()
      Description copied from interface: WorkerService
      Get the functions service (v2).

      This is a legacy API service for supporting v2.

      Specified by:
      getFunctionsV2 in interface WorkerService
      Returns:
      the functions service (v2).
    • getSinks

      public Sinks<? extends WorkerService> getSinks()
      Description copied from interface: WorkerService
      Get the sinks service.
      Specified by:
      getSinks in interface WorkerService
      Returns:
      the sinks service.
    • getSources

      public Sources<? extends WorkerService> getSources()
      Description copied from interface: WorkerService
      Get the sources service.
      Specified by:
      getSources in interface WorkerService
      Returns:
      the sources service.
    • getWorkers

      public Workers<? extends WorkerService> getWorkers()
      Description copied from interface: WorkerService
      Get the worker service.
      Specified by:
      getWorkers in interface WorkerService
      Returns:
      the worker service.
    • generateFunctionsStats

      public void generateFunctionsStats(org.apache.pulsar.common.util.SimpleTextOutputStream out)
      Description copied from interface: WorkerService
      Generate functions stats.
      Specified by:
      generateFunctionsStats in interface WorkerService
      Parameters:
      out - output stream