Modifier and Type | Field and Description |
---|---|
protected ReentrantLock |
ACQUISITION_MONITOR |
protected BackoffStrategy |
backoffStrategy |
protected long |
clientLockDuration |
protected EngineClient |
engineClient |
protected Map<String,ExternalTaskHandler> |
externalTaskHandlers |
protected ExternalTaskServiceImpl |
externalTaskService |
protected Condition |
IS_WAITING |
protected AtomicBoolean |
isBackoffStrategyDisabled |
protected AtomicBoolean |
isRunning |
protected static TopicSubscriptionManagerLogger |
LOG |
protected CopyOnWriteArrayList<TopicSubscription> |
subscriptions |
protected List<TopicRequestDto> |
taskTopicRequests |
protected Thread |
thread |
protected TypedValues |
typedValues |
Constructor and Description |
---|
TopicSubscriptionManager(EngineClient engineClient,
TypedValues typedValues,
long clientLockDuration) |
Modifier and Type | Method and Description |
---|---|
protected void |
acquire() |
void |
disableBackoffStrategy() |
protected List<ExternalTask> |
fetchAndLock(List<TopicRequestDto> subscriptions) |
EngineClient |
getEngineClient() |
List<TopicSubscription> |
getSubscriptions() |
protected void |
handleExternalTask(ExternalTask externalTask,
ExternalTaskHandler taskHandler) |
boolean |
isRunning() |
protected void |
prepareAcquisition(TopicSubscription subscription) |
protected void |
resume() |
void |
run() |
protected void |
runBackoffStrategy(List<ExternalTask> externalTasks) |
void |
setBackoffStrategy(BackoffStrategy backOffStrategy) |
void |
start() |
void |
stop() |
protected void |
subscribe(TopicSubscription subscription) |
protected void |
suspend(long waitTime) |
protected void |
unsubscribe(TopicSubscriptionImpl subscription) |
protected static final TopicSubscriptionManagerLogger LOG
protected ReentrantLock ACQUISITION_MONITOR
protected Condition IS_WAITING
protected AtomicBoolean isRunning
protected ExternalTaskServiceImpl externalTaskService
protected EngineClient engineClient
protected CopyOnWriteArrayList<TopicSubscription> subscriptions
protected List<TopicRequestDto> taskTopicRequests
protected Map<String,ExternalTaskHandler> externalTaskHandlers
protected Thread thread
protected BackoffStrategy backoffStrategy
protected AtomicBoolean isBackoffStrategyDisabled
protected TypedValues typedValues
protected long clientLockDuration
public TopicSubscriptionManager(EngineClient engineClient, TypedValues typedValues, long clientLockDuration)
protected void acquire()
protected void prepareAcquisition(TopicSubscription subscription)
protected List<ExternalTask> fetchAndLock(List<TopicRequestDto> subscriptions)
protected void handleExternalTask(ExternalTask externalTask, ExternalTaskHandler taskHandler)
public void stop()
public void start()
protected void subscribe(TopicSubscription subscription)
protected void unsubscribe(TopicSubscriptionImpl subscription)
public EngineClient getEngineClient()
public List<TopicSubscription> getSubscriptions()
public boolean isRunning()
public void setBackoffStrategy(BackoffStrategy backOffStrategy)
protected void runBackoffStrategy(List<ExternalTask> externalTasks)
protected void suspend(long waitTime)
protected void resume()
public void disableBackoffStrategy()
Copyright © 2022. All rights reserved.