Class TopicSubscriptionManager
- java.lang.Object
-
- org.camunda.bpm.client.topic.impl.TopicSubscriptionManager
-
-
Field Summary
Fields Modifier and Type Field 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 Summary
Constructors Constructor Description TopicSubscriptionManager(EngineClient engineClient, TypedValues typedValues, long clientLockDuration)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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)
-
-
-
Field Detail
-
LOG
protected static final TopicSubscriptionManagerLogger LOG
-
ACQUISITION_MONITOR
protected ReentrantLock ACQUISITION_MONITOR
-
IS_WAITING
protected Condition IS_WAITING
-
isRunning
protected AtomicBoolean isRunning
-
externalTaskService
protected ExternalTaskServiceImpl externalTaskService
-
engineClient
protected EngineClient engineClient
-
subscriptions
protected CopyOnWriteArrayList<TopicSubscription> subscriptions
-
taskTopicRequests
protected List<TopicRequestDto> taskTopicRequests
-
externalTaskHandlers
protected Map<String,ExternalTaskHandler> externalTaskHandlers
-
thread
protected Thread thread
-
backoffStrategy
protected BackoffStrategy backoffStrategy
-
isBackoffStrategyDisabled
protected AtomicBoolean isBackoffStrategyDisabled
-
typedValues
protected TypedValues typedValues
-
clientLockDuration
protected long clientLockDuration
-
-
Constructor Detail
-
TopicSubscriptionManager
public TopicSubscriptionManager(EngineClient engineClient, TypedValues typedValues, long clientLockDuration)
-
-
Method Detail
-
acquire
protected void acquire()
-
prepareAcquisition
protected void prepareAcquisition(TopicSubscription subscription)
-
fetchAndLock
protected List<ExternalTask> fetchAndLock(List<TopicRequestDto> subscriptions)
-
handleExternalTask
protected void handleExternalTask(ExternalTask externalTask, ExternalTaskHandler taskHandler)
-
stop
public void stop()
-
start
public void start()
-
subscribe
protected void subscribe(TopicSubscription subscription)
-
unsubscribe
protected void unsubscribe(TopicSubscriptionImpl subscription)
-
getEngineClient
public EngineClient getEngineClient()
-
getSubscriptions
public List<TopicSubscription> getSubscriptions()
-
isRunning
public boolean isRunning()
-
setBackoffStrategy
public void setBackoffStrategy(BackoffStrategy backOffStrategy)
-
runBackoffStrategy
protected void runBackoffStrategy(List<ExternalTask> externalTasks)
-
suspend
protected void suspend(long waitTime)
-
resume
protected void resume()
-
disableBackoffStrategy
public void disableBackoffStrategy()
-
-