public class SchedulerManager extends Object implements AutoCloseable
| Modifier and Type | Class and Description |
|---|---|
static class |
SchedulerManager.RebalanceInProgressException |
| Modifier and Type | Field and Description |
|---|---|
static String |
HEARTBEAT_NAMESPACE |
static String |
HEARTBEAT_TENANT |
| Constructor and Description |
|---|
SchedulerManager(WorkerConfig workerConfig,
org.apache.pulsar.client.api.PulsarClient pulsarClient,
PulsarAdmin admin,
WorkerStatsManager workerStatsManager,
ErrorNotifier errorNotifier) |
| Modifier and Type | Method and Description |
|---|---|
org.apache.pulsar.client.api.Producer<byte[]> |
acquireExclusiveWrite(Supplier<Boolean> isLeader)
Acquires a exclusive producer.
|
void |
close() |
void |
initialize(org.apache.pulsar.client.api.Producer<byte[]> exclusiveProducer) |
Future<?> |
rebalanceIfNotInprogress() |
Future<?> |
schedule() |
public static final String HEARTBEAT_TENANT
public static final String HEARTBEAT_NAMESPACE
public SchedulerManager(WorkerConfig workerConfig, org.apache.pulsar.client.api.PulsarClient pulsarClient, PulsarAdmin admin, WorkerStatsManager workerStatsManager, ErrorNotifier errorNotifier)
public org.apache.pulsar.client.api.Producer<byte[]> acquireExclusiveWrite(Supplier<Boolean> isLeader) throws WorkerUtils.NotLeaderAnymore
isLeader - if the worker is still the leaderWorkerUtils.NotLeaderAnymore - if the worker is no longer the leader.public void initialize(org.apache.pulsar.client.api.Producer<byte[]> exclusiveProducer)
public Future<?> schedule()
public Future<?> rebalanceIfNotInprogress()
public void close()
close in interface AutoCloseableCopyright © 2017–2021 Apache Software Foundation. All rights reserved.