Package org.camunda.bpm.engine.impl.cmd
Class AcquireJobsCmd
java.lang.Object
org.camunda.bpm.engine.impl.cmd.AcquireJobsCmd
- All Implemented Interfaces:
OptimisticLockingListener
,Command<AcquiredJobs>
public class AcquireJobsCmd
extends Object
implements Command<AcquiredJobs>, OptimisticLockingListener
- Author:
- Nick Burch, Daniel Meyer
-
Field Summary
-
Constructor Summary
ConstructorDescriptionAcquireJobsCmd
(JobExecutor jobExecutor) AcquireJobsCmd
(JobExecutor jobExecutor, int numJobsToAcquire) -
Method Summary
Modifier and TypeMethodDescriptionexecute
(CommandContext commandContext) failedOperation
(DbOperation operation) Signifies that an operation failed due to optimistic locking.The type of the entity for which this listener should be notified.protected boolean
protected void
protected String
selectProcessInstanceId
(AcquirableJobEntity job, boolean isAcquireExclusiveOverProcessHierarchies)
-
Field Details
-
acquiredJobs
-
numJobsToAcquire
protected int numJobsToAcquire
-
-
Constructor Details
-
AcquireJobsCmd
-
AcquireJobsCmd
-
-
Method Details
-
execute
- Specified by:
execute
in interfaceCommand<AcquiredJobs>
-
lockJob
-
getEntityType
Description copied from interface:OptimisticLockingListener
The type of the entity for which this listener should be notified. If the implementation returns 'null', the listener is notified for all entity types.- Specified by:
getEntityType
in interfaceOptimisticLockingListener
- Returns:
- the entity type for which the listener should be notified.
-
failedOperation
Description copied from interface:OptimisticLockingListener
Signifies that an operation failed due to optimistic locking.- Specified by:
failedOperation
in interfaceOptimisticLockingListener
- Parameters:
operation
- the failed operation.- Returns:
OptimisticLockingResult
that instructs the caller how to handle the result of the failed operation.
-
isAcquireExclusiveOverProcessHierarchies
-
selectProcessInstanceId
protected String selectProcessInstanceId(AcquirableJobEntity job, boolean isAcquireExclusiveOverProcessHierarchies)
-