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)
ExternalTaskQueryBuilder
topic
in interface ExternalTaskQueryBuilder
topicName
- the name of the topiclockDuration
- the duration in milliseconds for which tasks should be locked;
begins at the time of fetchingpublic List<LockedExternalTask> execute()
ExternalTaskQueryBuilder
execute
in interface ExternalTaskQueryBuilder
public void addInstruction(TopicFetchInstruction instruction)
Copyright © 2015. All rights reserved.