类 SchedulerManager
- java.lang.Object
-
- org.apache.pulsar.functions.worker.SchedulerManager
-
- 所有已实现的接口:
java.lang.AutoCloseable
public class SchedulerManager extends java.lang.Object implements java.lang.AutoCloseable
-
-
嵌套类概要
嵌套类 修饰符和类型 类 说明 static classSchedulerManager.RebalanceInProgressException
-
字段概要
字段 修饰符和类型 字段 说明 static java.lang.StringHEARTBEAT_NAMESPACEstatic java.lang.StringHEARTBEAT_TENANT
-
构造器概要
构造器 构造器 说明 SchedulerManager(org.apache.pulsar.functions.worker.WorkerConfig workerConfig, org.apache.pulsar.client.api.PulsarClient pulsarClient, org.apache.pulsar.client.admin.PulsarAdmin admin, WorkerStatsManager workerStatsManager, ErrorNotifier errorNotifier)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 org.apache.pulsar.client.api.Producer<byte[]>acquireExclusiveWrite(java.util.function.Supplier<java.lang.Boolean> isLeader)Acquires a exclusive producer.voidclose()voidinitialize(org.apache.pulsar.client.api.Producer<byte[]> exclusiveProducer)java.util.concurrent.Future<?>rebalanceIfNotInprogress()java.util.concurrent.Future<?>schedule()
-
-
-
构造器详细资料
-
SchedulerManager
public SchedulerManager(org.apache.pulsar.functions.worker.WorkerConfig workerConfig, org.apache.pulsar.client.api.PulsarClient pulsarClient, org.apache.pulsar.client.admin.PulsarAdmin admin, WorkerStatsManager workerStatsManager, ErrorNotifier errorNotifier)
-
-
方法详细资料
-
acquireExclusiveWrite
public org.apache.pulsar.client.api.Producer<byte[]> acquireExclusiveWrite(java.util.function.Supplier<java.lang.Boolean> isLeader) throws WorkerUtils.NotLeaderAnymoreAcquires a exclusive producer. This method cannot return null. It can only return a valid exclusive producer or throw NotLeaderAnymore exception.- 参数:
isLeader- if the worker is still the leader- 返回:
- A valid exclusive producer
- 抛出:
WorkerUtils.NotLeaderAnymore- if the worker is no longer the leader.
-
initialize
public void initialize(org.apache.pulsar.client.api.Producer<byte[]> exclusiveProducer)
-
schedule
public java.util.concurrent.Future<?> schedule()
-
rebalanceIfNotInprogress
public java.util.concurrent.Future<?> rebalanceIfNotInprogress()
-
close
public void close()
- 指定者:
close在接口中java.lang.AutoCloseable
-
-