Package org.apache.druid.metadata
Class TaskLookup.CompleteTaskLookup
java.lang.Object
org.apache.druid.metadata.TaskLookup.CompleteTaskLookup
- All Implemented Interfaces:
TaskLookup
- Enclosing interface:
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
ConstructorsConstructorDescriptionCompleteTaskLookup(Integer maxTaskStatuses, org.joda.time.DateTime tasksCreatedPriorTo) -
Method Summary
Modifier and TypeMethodDescriptionbooleanorg.joda.time.DateTimegetType()inthashCode()booleanbooleanisNil()Whether this lookup is guaranteed to not return any tasks.withMinTimestampIfAbsent(org.joda.time.DateTime minTimestamp) IfhasTaskCreatedTimeFilter(), returns this instance.withTasksCreatedPriorTo(Integer maxTaskStatuses, org.joda.time.DateTime tasksCreatedPriorTo)
-
Constructor Details
-
CompleteTaskLookup
public CompleteTaskLookup(@Nullable Integer maxTaskStatuses, @Nullable org.joda.time.DateTime tasksCreatedPriorTo)
-
-
Method Details
-
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
IfhasTaskCreatedTimeFilter(), returns this instance. Otherwise, returns a copy withgetTasksCreatedPriorTo()based on the provided duration (before now). -
getTasksCreatedPriorTo
public org.joda.time.DateTime getTasksCreatedPriorTo() -
getMaxTaskStatuses
-
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
-
equals
-
hashCode
public int hashCode()
-