Class TopicSubscriptionManager
java.lang.Object
org.camunda.bpm.client.topic.impl.TopicSubscriptionManager
- All Implemented Interfaces:
Runnable
- Author:
- Tassilo Weidner
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ReentrantLockprotected BackoffStrategyprotected longprotected EngineClientprotected Map<String,ExternalTaskHandler> protected ExternalTaskServiceImplprotected Conditionprotected AtomicBooleanprotected AtomicBooleanprotected static final TopicSubscriptionManagerLoggerprotected CopyOnWriteArrayList<TopicSubscription>protected List<TopicRequestDto>protected Threadprotected TypedValues -
Constructor Summary
ConstructorsConstructorDescriptionTopicSubscriptionManager(EngineClient engineClient, TypedValues typedValues, long clientLockDuration) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidacquire()voidprotected FetchAndLockResponseDtofetchAndLock(List<TopicRequestDto> subscriptions) protected voidhandleExternalTask(ExternalTask externalTask, ExternalTaskHandler taskHandler) booleanprotected voidprepareAcquisition(TopicSubscription subscription) protected voidresume()voidrun()protected voidrunBackoffStrategy(FetchAndLockResponseDto fetchAndLockResponse) voidsetBackoffStrategy(BackoffStrategy backOffStrategy) voidstart()voidstop()protected voidsubscribe(TopicSubscription subscription) protected voidsuspend(long waitTime) protected voidunsubscribe(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()
-