public class FetchExternalTasksCmd extends Object implements Command<List<LockedExternalTask>>
| Modifier and Type | Field and Description | 
|---|---|
protected Map<String,TopicFetchInstruction> | 
fetchInstructions  | 
protected static EnginePersistenceLogger | 
LOG  | 
protected int | 
maxResults  | 
protected boolean | 
usePriority  | 
protected String | 
workerId  | 
| Constructor and Description | 
|---|
FetchExternalTasksCmd(String workerId,
                     int maxResults,
                     Map<String,TopicFetchInstruction> instructions)  | 
FetchExternalTasksCmd(String workerId,
                     int maxResults,
                     Map<String,TopicFetchInstruction> instructions,
                     boolean usePriority)  | 
| Modifier and Type | Method and Description | 
|---|---|
List<LockedExternalTask> | 
execute(CommandContext commandContext)  | 
protected void | 
filterOnOptimisticLockingFailure(CommandContext commandContext,
                                List<LockedExternalTask> tasks)  | 
boolean | 
isRetryable()
When CockroachDB is used, this command may be retried multiple times until
 it is successful, or the retries are exhausted. 
 | 
protected void | 
validateInput()  | 
protected static final EnginePersistenceLogger LOG
protected String workerId
protected int maxResults
protected boolean usePriority
protected Map<String,TopicFetchInstruction> fetchInstructions
public FetchExternalTasksCmd(String workerId, int maxResults, Map<String,TopicFetchInstruction> instructions)
public FetchExternalTasksCmd(String workerId, int maxResults, Map<String,TopicFetchInstruction> instructions, boolean usePriority)
public List<LockedExternalTask> execute(CommandContext commandContext)
execute in interface Command<List<LockedExternalTask>>public boolean isRetryable()
isRetryable in interface Command<List<LockedExternalTask>>CrdbTransactionRetryInterceptor
   can make a transparent retry of this command upon failure
   with a CrdbTransactionRetryException (only used when running on CockroachDB).protected void filterOnOptimisticLockingFailure(CommandContext commandContext, List<LockedExternalTask> tasks)
protected void validateInput()
Copyright © 2022. All rights reserved.