public class AcquireJobsCmd extends Object implements Command<AcquiredJobs>, OptimisticLockingListener
| Modifier and Type | Field and Description |
|---|---|
protected AcquiredJobs |
acquiredJobs |
| Constructor and Description |
|---|
AcquireJobsCmd(JobExecutor jobExecutor) |
| 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 List<String> |
lockExclusiveJobs(CommandContext commandContext,
JobEntity job) |
protected void |
lockJob(JobEntity job) |
protected AcquiredJobs acquiredJobs
public AcquireJobsCmd(JobExecutor jobExecutor)
public AcquiredJobs execute(CommandContext commandContext)
execute in interface Command<AcquiredJobs>protected List<String> lockExclusiveJobs(CommandContext commandContext, JobEntity job)
protected void lockJob(JobEntity job)
public Class<? extends DbEntity> getEntityType()
OptimisticLockingListenergetEntityType in interface OptimisticLockingListenerpublic void failedOperation(DbOperation operation)
OptimisticLockingListenerfailedOperation in interface OptimisticLockingListeneroperation - the failed operation.Copyright © 2018. All rights reserved.