public class ExternalWorkerJobAcquireBuilderImpl extends Object implements ExternalWorkerJobAcquireBuilder
| Modifier and Type | Field and Description |
|---|---|
protected Collection<String> |
authorizedGroups |
protected String |
authorizedUser |
protected CommandExecutor |
commandExecutor |
protected JobServiceConfiguration |
jobServiceConfiguration |
protected Duration |
lockDuration |
protected String |
scopeType |
protected String |
tenantId |
protected String |
topic |
| Constructor and Description |
|---|
ExternalWorkerJobAcquireBuilderImpl(CommandExecutor commandExecutor,
JobServiceConfiguration jobServiceConfiguration) |
| Modifier and Type | Method and Description |
|---|---|
List<AcquiredExternalWorkerJob> |
acquireAndLock(int numberOfTasks,
String workerId,
int numberOfRetries)
Acquire and lock the given number of jobs for the given worker id.
|
ExternalWorkerJobAcquireBuilder |
forUserOrGroups(String userId,
Collection<String> groups)
Acquire only jobs where the given user or groups are authorized to execute.
|
Collection<String> |
getAuthorizedGroups() |
String |
getAuthorizedUser() |
Duration |
getLockDuration() |
String |
getScopeType() |
String |
getTenantId() |
String |
getTopic() |
ExternalWorkerJobAcquireBuilder |
onlyBpmn()
Acquire only jobs which are linked to a process instance.
|
ExternalWorkerJobAcquireBuilder |
onlyCmmn()
Acquire only jobs which are linked to a case instance.
|
ExternalWorkerJobAcquireBuilder |
scopeType(String scopeType)
Acquire only jobs which are linked to the given scope type.
|
ExternalWorkerJobAcquireBuilder |
tenantId(String tenantId)
Acquire only jobs which are within the given tenant.
|
ExternalWorkerJobAcquireBuilder |
topic(String topic,
Duration lockDuration)
The topic and lock duration for the requested jobs
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitacquireAndLockprotected final CommandExecutor commandExecutor
protected final JobServiceConfiguration jobServiceConfiguration
protected String topic
protected Duration lockDuration
protected String scopeType
protected String tenantId
protected String authorizedUser
protected Collection<String> authorizedGroups
public ExternalWorkerJobAcquireBuilderImpl(CommandExecutor commandExecutor, JobServiceConfiguration jobServiceConfiguration)
public ExternalWorkerJobAcquireBuilder topic(String topic, Duration lockDuration)
ExternalWorkerJobAcquireBuildertopic in interface ExternalWorkerJobAcquireBuildertopic - the topic of the jobslockDuration - the duration for locking the jobspublic ExternalWorkerJobAcquireBuilder onlyBpmn()
ExternalWorkerJobAcquireBuilderExternalWorkerJobAcquireBuilder.onlyCmmn() and ExternalWorkerJobAcquireBuilder.scopeType(String)onlyBpmn in interface ExternalWorkerJobAcquireBuilderpublic ExternalWorkerJobAcquireBuilder onlyCmmn()
ExternalWorkerJobAcquireBuilderExternalWorkerJobAcquireBuilder.onlyBpmn() and ExternalWorkerJobAcquireBuilder.scopeType(String)onlyCmmn in interface ExternalWorkerJobAcquireBuilderpublic ExternalWorkerJobAcquireBuilder scopeType(String scopeType)
ExternalWorkerJobAcquireBuilderExternalWorkerJobAcquireBuilder.onlyBpmn() or ExternalWorkerJobAcquireBuilder.onlyCmmn()scopeType in interface ExternalWorkerJobAcquireBuilderpublic ExternalWorkerJobAcquireBuilder tenantId(String tenantId)
ExternalWorkerJobAcquireBuildertenantId in interface ExternalWorkerJobAcquireBuilderpublic ExternalWorkerJobAcquireBuilder forUserOrGroups(String userId, Collection<String> groups)
ExternalWorkerJobAcquireBuilderforUserOrGroups in interface ExternalWorkerJobAcquireBuilderpublic List<AcquiredExternalWorkerJob> acquireAndLock(int numberOfTasks, String workerId, int numberOfRetries)
ExternalWorkerJobAcquireBuildernumberOfRetries it will return an empty listacquireAndLock in interface ExternalWorkerJobAcquireBuildernumberOfTasks - the number of jobs to acquireworkerId - the id of the worker acquiring the jobsnumberOfRetries - the number of retries if an optimistic lock exception occurs during acquiringpublic String getTopic()
public Duration getLockDuration()
public String getScopeType()
public String getTenantId()
public String getAuthorizedUser()
public Collection<String> getAuthorizedGroups()
Copyright © 2023 Flowable. All rights reserved.