org.camunda.bpm.engine.impl.cmd
Class AcquireJobsCmd

java.lang.Object
  extended by 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
protected  AcquiredJobs acquiredJobs
           
protected  int numJobsToAcquire
           
 
Constructor Summary
AcquireJobsCmd(JobExecutor jobExecutor)
           
AcquireJobsCmd(JobExecutor jobExecutor, int numJobsToAcquire)
           
 
Method Summary
 AcquiredJobs execute(CommandContext commandContext)
           
 void failedOperation(DbOperation operation)
          Signifies that an operation failed due to optimistic locking.
 Class<? extends DbEntity> getEntityType()
          The type of the entity for which this listener should be notified.
protected  List<String> lockExclusiveJobs(CommandContext commandContext, JobEntity job)
           
protected  void lockJob(JobEntity job)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

acquiredJobs

protected AcquiredJobs acquiredJobs

numJobsToAcquire

protected int numJobsToAcquire
Constructor Detail

AcquireJobsCmd

public AcquireJobsCmd(JobExecutor jobExecutor)

AcquireJobsCmd

public AcquireJobsCmd(JobExecutor jobExecutor,
                      int numJobsToAcquire)
Method Detail

execute

public AcquiredJobs execute(CommandContext commandContext)
Specified by:
execute in interface Command<AcquiredJobs>

lockExclusiveJobs

protected List<String> lockExclusiveJobs(CommandContext commandContext,
                                         JobEntity job)

lockJob

protected void lockJob(JobEntity job)

getEntityType

public Class<? extends DbEntity> 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 interface OptimisticLockingListener
Returns:
the entity type for which the listener should be notified.

failedOperation

public void failedOperation(DbOperation operation)
Description copied from interface: OptimisticLockingListener
Signifies that an operation failed due to optimistic locking.

Specified by:
failedOperation in interface OptimisticLockingListener
Parameters:
operation - the failed operation.


Copyright © 2016 camunda services GmbH. All rights reserved.