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 boolean
equals(Object o)
Integer
getMaxTaskStatuses()
org.joda.time.DateTime
getTasksCreatedPriorTo()
TaskLookup.TaskLookupType
getType()
int
hashCode()
boolean
hasTaskCreatedTimeFilter()
boolean
isNil()
Whether this lookup is guaranteed to not return any tasks.static TaskLookup.CompleteTaskLookup
of(Integer maxTaskStatuses, org.joda.time.Duration durationBeforeNow)
TaskLookup.CompleteTaskLookup
withMinTimestampIfAbsent(org.joda.time.DateTime minTimestamp)
IfhasTaskCreatedTimeFilter()
, returns this instance.static TaskLookup.CompleteTaskLookup
withTasksCreatedPriorTo(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:
getType
in interfaceTaskLookup
-
isNil
public boolean isNil()
Description copied from interface:TaskLookup
Whether this lookup is guaranteed to not return any tasks.- Specified by:
isNil
in interfaceTaskLookup
-
-