org.camunda.bpm.engine.impl.externaltask
Class ExternalTaskQueryBuilderImpl

java.lang.Object
  extended by org.camunda.bpm.engine.impl.externaltask.ExternalTaskQueryBuilderImpl
All Implemented Interfaces:
ExternalTaskQueryBuilder

public class ExternalTaskQueryBuilderImpl
extends Object
implements ExternalTaskQueryBuilder

Author:
Thorben Lindhauer

Field Summary
protected  CommandExecutor commandExecutor
           
protected  Map<String,TopicFetchInstruction> instructions
           
protected  int maxTasks
           
protected  String workerId
           
 
Constructor Summary
ExternalTaskQueryBuilderImpl(CommandExecutor commandExecutor, String workerId, int maxTasks)
           
 
Method Summary
 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

commandExecutor

protected CommandExecutor commandExecutor

workerId

protected String workerId

maxTasks

protected int maxTasks

instructions

protected Map<String,TopicFetchInstruction> instructions
Constructor Detail

ExternalTaskQueryBuilderImpl

public ExternalTaskQueryBuilderImpl(CommandExecutor commandExecutor,
                                    String workerId,
                                    int maxTasks)
Method Detail

topic

public ExternalTaskQueryTopicBuilder topic(String topicName,
                                           long lockDuration)
Description copied from interface: ExternalTaskQueryBuilder
Specifies that tasks of a topic should be fetched and locked for a certain amount of time

Specified by:
topic in interface ExternalTaskQueryBuilder
Parameters:
topicName - the name of the topic
lockDuration - the duration in milliseconds for which tasks should be locked; begins at the time of fetching
Returns:

execute

public List<LockedExternalTask> execute()
Description copied from interface: ExternalTaskQueryBuilder
Performs the fetching. Locks candidate tasks of the given topics for the specified duration.

Specified by:
execute in interface ExternalTaskQueryBuilder
Returns:
fetched external tasks that match the topic and that can be successfully locked

addInstruction

public void addInstruction(TopicFetchInstruction instruction)


Copyright © 2016 camunda services GmbH. All rights reserved.