Package org.apache.druid.metadata
Class TaskLookup.CompleteTaskLookup
- java.lang.Object
-
- org.apache.druid.metadata.TaskLookup.CompleteTaskLookup
-
- All Implemented Interfaces:
TaskLookup
- Enclosing interface:
- TaskLookup
public static class TaskLookup.CompleteTaskLookup extends Object implements TaskLookup
Task lookup for complete tasks. It includes optional filters for task lookups. When the filters are given, the task lookup returns only the tasks that satisfy all filters.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.druid.metadata.TaskLookup
TaskLookup.ActiveTaskLookup, TaskLookup.CompleteTaskLookup, TaskLookup.TaskLookupType
-
-
Constructor Summary
Constructors Constructor Description CompleteTaskLookup(Integer maxTaskStatuses, org.joda.time.DateTime tasksCreatedPriorTo)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)IntegergetMaxTaskStatuses()org.joda.time.DateTimegetTasksCreatedPriorTo()TaskLookup.TaskLookupTypegetType()inthashCode()booleanhasTaskCreatedTimeFilter()booleanisNil()Whether this lookup is guaranteed to not return any tasks.static TaskLookup.CompleteTaskLookupof(Integer maxTaskStatuses, org.joda.time.Duration durationBeforeNow)TaskLookup.CompleteTaskLookupwithMinTimestampIfAbsent(org.joda.time.DateTime minTimestamp)IfhasTaskCreatedTimeFilter(), returns this instance.static TaskLookup.CompleteTaskLookupwithTasksCreatedPriorTo(Integer maxTaskStatuses, org.joda.time.DateTime tasksCreatedPriorTo)
-
-
-
Method Detail
-
of
public static TaskLookup.CompleteTaskLookup of(@Nullable Integer maxTaskStatuses, @Nullable org.joda.time.Duration durationBeforeNow)
-
withTasksCreatedPriorTo
public static TaskLookup.CompleteTaskLookup withTasksCreatedPriorTo(@Nullable Integer maxTaskStatuses, @Nullable org.joda.time.DateTime tasksCreatedPriorTo)
-
hasTaskCreatedTimeFilter
public boolean hasTaskCreatedTimeFilter()
-
withMinTimestampIfAbsent
public TaskLookup.CompleteTaskLookup withMinTimestampIfAbsent(org.joda.time.DateTime minTimestamp)
IfhasTaskCreatedTimeFilter(), returns this instance. Otherwise, returns a copy withgetTasksCreatedPriorTo()based on the provided duration (before now).
-
getTasksCreatedPriorTo
public org.joda.time.DateTime getTasksCreatedPriorTo()
-
getType
public TaskLookup.TaskLookupType getType()
- Specified by:
getTypein interfaceTaskLookup
-
isNil
public boolean isNil()
Description copied from interface:TaskLookupWhether this lookup is guaranteed to not return any tasks.- Specified by:
isNilin interfaceTaskLookup
-
-