public class AcquireJobsCmd extends Object implements Command<AcquiredJobs>, OptimisticLockingListener
Modifier and Type | Field and Description |
---|---|
protected AcquiredJobs |
acquiredJobs |
protected int |
numJobsToAcquire |
Constructor and Description |
---|
AcquireJobsCmd(JobExecutor jobExecutor) |
AcquireJobsCmd(JobExecutor jobExecutor,
int numJobsToAcquire) |
Modifier and Type | Method and Description |
---|---|
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 void |
lockJob(AcquirableJobEntity job) |
protected AcquiredJobs acquiredJobs
protected int numJobsToAcquire
public AcquireJobsCmd(JobExecutor jobExecutor)
public AcquireJobsCmd(JobExecutor jobExecutor, int numJobsToAcquire)
public AcquiredJobs execute(CommandContext commandContext)
execute
in interface Command<AcquiredJobs>
protected void lockJob(AcquirableJobEntity job)
public Class<? extends DbEntity> getEntityType()
OptimisticLockingListener
getEntityType
in interface OptimisticLockingListener
public void failedOperation(DbOperation operation)
OptimisticLockingListener
failedOperation
in interface OptimisticLockingListener
operation
- the failed operation.Copyright © 2021. All rights reserved.