Interface FetchAndLockBuilder
- All Known Implementing Classes:
FetchAndLockBuilderImpl
public interface FetchAndLockBuilder
Fetch And Lock Builder used to enable a Fluent API that exposes all parameters for fetch and Lock operation.
-
Method Summary
Modifier and TypeMethodDescriptionasc()
Configures the order to be ascending.desc()
Configures the order to be descending.maxTasks
(int maxTasks) Configures the max tasks fetching that will be used during the Fetch and Lock operation.Configures the fetching during the Fetch and Lock Operation to include ordering by create time of the external tasks.Returns theExternalTaskQueryTopicBuilder
to handle all the configuration that applies per topic.usePriority
(boolean usePriority) Configures fetching to consider (or not) priority during the Fetch and Lock operation.Configures the workerId that will be used during the Fetch and Lock operation.
-
Method Details
-
workerId
Configures the workerId that will be used during the Fetch and Lock operation.- Parameters:
workerId
- the given workerId- Returns:
- the builder
-
maxTasks
Configures the max tasks fetching that will be used during the Fetch and Lock operation.- Parameters:
maxTasks
- the given number of max tasks- Returns:
- the builder
-
usePriority
Configures fetching to consider (or not) priority during the Fetch and Lock operation.- Parameters:
usePriority
- the given usePriority flag. If true, tasks will be fetched in descending order.- Returns:
- the builder
-
orderByCreateTime
FetchAndLockBuilder orderByCreateTime()Configures the fetching during the Fetch and Lock Operation to include ordering by create time of the external tasks. This method can be combined by calling asc() or desc() afterwards to define an ascending or descending order respectively.- Returns:
- the builder
-
asc
FetchAndLockBuilder asc()Configures the order to be ascending.- Returns:
- the builder
-
desc
FetchAndLockBuilder desc()Configures the order to be descending.- Returns:
- the builder
-
subscribe
ExternalTaskQueryTopicBuilder subscribe()Returns theExternalTaskQueryTopicBuilder
to handle all the configuration that applies per topic.- Returns:
- the builder
-