public class ExternalTaskQueryBuilderImpl extends Object implements ExternalTaskQueryBuilder
| Modifier and Type | Field and Description |
|---|---|
protected CommandExecutor |
commandExecutor |
protected Map<String,TopicFetchInstruction> |
instructions |
protected int |
maxTasks |
protected String |
workerId |
| Constructor and Description |
|---|
ExternalTaskQueryBuilderImpl(CommandExecutor commandExecutor,
String workerId,
int maxTasks) |
| Modifier and Type | Method and Description |
|---|---|
void |
addInstruction(TopicFetchInstruction instruction) |
List<LockedExternalTask> |
execute()
Performs the fetching.
|
ExternalTaskQueryTopicBuilder |
topic(String topicName,
long lockDuration)
Specifies that tasks of a topic should be fetched and locked for
a certain amount of time
|
protected CommandExecutor commandExecutor
protected String workerId
protected int maxTasks
protected Map<String,TopicFetchInstruction> instructions
public ExternalTaskQueryBuilderImpl(CommandExecutor commandExecutor, String workerId, int maxTasks)
public ExternalTaskQueryTopicBuilder topic(String topicName, long lockDuration)
ExternalTaskQueryBuildertopic in interface ExternalTaskQueryBuildertopicName - the name of the topiclockDuration - the duration in milliseconds for which tasks should be locked;
begins at the time of fetchingpublic List<LockedExternalTask> execute()
ExternalTaskQueryBuilderexecute in interface ExternalTaskQueryBuilderpublic void addInstruction(TopicFetchInstruction instruction)
Copyright © 2015. All rights reserved.