Class TopicSubscriptionManager
java.lang.Object
org.camunda.bpm.client.topic.impl.TopicSubscriptionManager
- All Implemented Interfaces:
Runnable
- Author:
- Tassilo Weidner
-
Field Summary
Modifier and TypeFieldDescriptionprotected ReentrantLock
protected BackoffStrategy
protected long
protected EngineClient
protected Map<String,
ExternalTaskHandler> protected ExternalTaskServiceImpl
protected Condition
protected AtomicBoolean
protected AtomicBoolean
protected static final TopicSubscriptionManagerLogger
protected CopyOnWriteArrayList<TopicSubscription>
protected List<TopicRequestDto>
protected Thread
protected TypedValues
-
Constructor Summary
ConstructorDescriptionTopicSubscriptionManager
(EngineClient engineClient, TypedValues typedValues, long clientLockDuration) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
acquire()
void
protected FetchAndLockResponseDto
fetchAndLock
(List<TopicRequestDto> subscriptions) protected void
handleExternalTask
(ExternalTask externalTask, ExternalTaskHandler taskHandler) boolean
protected void
prepareAcquisition
(TopicSubscription subscription) protected void
resume()
void
run()
protected void
runBackoffStrategy
(FetchAndLockResponseDto fetchAndLockResponse) void
setBackoffStrategy
(BackoffStrategy backOffStrategy) void
start()
void
stop()
protected void
subscribe
(TopicSubscription subscription) protected void
suspend
(long waitTime) protected void
unsubscribe
(TopicSubscriptionImpl subscription)
-
Field Details
-
LOG
-
ACQUISITION_MONITOR
-
IS_WAITING
-
isRunning
-
externalTaskService
-
engineClient
-
subscriptions
-
taskTopicRequests
-
externalTaskHandlers
-
thread
-
backoffStrategy
-
isBackoffStrategyDisabled
-
typedValues
-
clientLockDuration
protected long clientLockDuration
-
-
Constructor Details
-
TopicSubscriptionManager
public TopicSubscriptionManager(EngineClient engineClient, TypedValues typedValues, long clientLockDuration)
-
-
Method Details
-
run
public void run() -
acquire
protected void acquire() -
prepareAcquisition
-
fetchAndLock
-
handleExternalTask
-
stop
public void stop() -
start
public void start() -
subscribe
-
unsubscribe
-
getEngineClient
-
getSubscriptions
-
isRunning
public boolean isRunning() -
setBackoffStrategy
-
runBackoffStrategy
-
suspend
protected void suspend(long waitTime) -
resume
protected void resume() -
disableBackoffStrategy
public void disableBackoffStrategy()
-