类 ThreadRuntimeFactory
java.lang.Object
org.apache.pulsar.functions.runtime.thread.ThreadRuntimeFactory
- 所有已实现的接口:
AutoCloseable,RuntimeFactory
Thread based function container factory implementation.
-
构造器概要
构造器构造器说明ThreadRuntimeFactory(String threadGroupName, String pulsarServiceUrl, String stateStorageImplClass, String storageServiceUrl, org.apache.pulsar.functions.instance.AuthenticationConfig authConfig, org.apache.pulsar.functions.secretsprovider.SecretsProvider secretsProvider, org.apache.pulsar.functions.instance.stats.FunctionCollectorRegistry collectorRegistry, String narExtractionDirectory, ClassLoader rootClassLoader, boolean exposePulsarAdminClientEnabled, String pulsarWebServiceUrl) This constructor is used by other runtimes (e.g.ThreadRuntimeFactory(String threadGroupName, String pulsarServiceUrl, String stateStorageImplClass, String storageServiceUrl, org.apache.pulsar.functions.instance.AuthenticationConfig authConfig, org.apache.pulsar.functions.secretsprovider.SecretsProvider secretsProvider, org.apache.pulsar.functions.instance.stats.FunctionCollectorRegistry collectorRegistry, String narExtractionDirectory, ClassLoader rootClassLoader, boolean exposePulsarAdminClientEnabled, String pulsarWebServiceUrl, org.apache.pulsar.functions.utils.functioncache.FunctionCacheManager fnCache) -
方法概要
修饰符和类型方法说明voidclose()createContainer(org.apache.pulsar.functions.instance.InstanceConfig instanceConfig, String jarFile, String originalCodeFileName, Long expectedHealthCheckInterval) Create a function container to execute a java instance.voidinitialize(WorkerConfig workerConfig, org.apache.pulsar.functions.instance.AuthenticationConfig authenticationConfig, org.apache.pulsar.functions.secretsproviderconfigurator.SecretsProviderConfigurator secretsProviderConfigurator, ConnectorsManager connectorsManager, Optional<FunctionAuthProvider> functionAuthProvider, Optional<RuntimeCustomizer> runtimeCustomizer) 从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait从接口继承的方法 org.apache.pulsar.functions.runtime.RuntimeFactory
doAdmissionChecks, externallyManaged, getAuthProvider, getRuntimeCustomizer
-
构造器详细资料
-
ThreadRuntimeFactory
public ThreadRuntimeFactory(String threadGroupName, String pulsarServiceUrl, String stateStorageImplClass, String storageServiceUrl, org.apache.pulsar.functions.instance.AuthenticationConfig authConfig, org.apache.pulsar.functions.secretsprovider.SecretsProvider secretsProvider, org.apache.pulsar.functions.instance.stats.FunctionCollectorRegistry collectorRegistry, String narExtractionDirectory, ClassLoader rootClassLoader, boolean exposePulsarAdminClientEnabled, String pulsarWebServiceUrl) throws Exception This constructor is used by other runtimes (e.g. ProcessRuntime and KubernetesRuntime) that rely on ThreadRuntime to actually run an instance of the function. When used by other runtimes, the arguments such as secretsProvider and rootClassLoader will be provided.- 抛出:
Exception
-
ThreadRuntimeFactory
public ThreadRuntimeFactory(String threadGroupName, String pulsarServiceUrl, String stateStorageImplClass, String storageServiceUrl, org.apache.pulsar.functions.instance.AuthenticationConfig authConfig, org.apache.pulsar.functions.secretsprovider.SecretsProvider secretsProvider, org.apache.pulsar.functions.instance.stats.FunctionCollectorRegistry collectorRegistry, String narExtractionDirectory, ClassLoader rootClassLoader, boolean exposePulsarAdminClientEnabled, String pulsarWebServiceUrl, org.apache.pulsar.functions.utils.functioncache.FunctionCacheManager fnCache) throws Exception - 抛出:
Exception
-
-
方法详细资料
-
initialize
public void initialize(WorkerConfig workerConfig, org.apache.pulsar.functions.instance.AuthenticationConfig authenticationConfig, org.apache.pulsar.functions.secretsproviderconfigurator.SecretsProviderConfigurator secretsProviderConfigurator, ConnectorsManager connectorsManager, Optional<FunctionAuthProvider> functionAuthProvider, Optional<RuntimeCustomizer> runtimeCustomizer) throws Exception - 指定者:
initialize在接口中RuntimeFactory- 抛出:
Exception
-
createContainer
public ThreadRuntime createContainer(org.apache.pulsar.functions.instance.InstanceConfig instanceConfig, String jarFile, String originalCodeFileName, Long expectedHealthCheckInterval) 从接口复制的说明:RuntimeFactoryCreate a function container to execute a java instance.- 指定者:
createContainer在接口中RuntimeFactory- 参数:
instanceConfig- java instance configjarFile- code fileexpectedHealthCheckInterval- expected health check interval in seconds- 返回:
- function container to start/stop instance
-
close
public void close()- 指定者:
close在接口中AutoCloseable- 指定者:
close在接口中RuntimeFactory
-