public final class PhasesFilter extends java.lang.Object implements JobFilter
Only jobs that are in one of the execution phases listed in this filter are kept.
The constructor of this filter requires exactly one execution phase.
But obviously more phases can be added to the list of accepted execution
phases by using the function add(ExecutionPhase)
.
Modifier and Type | Field and Description |
---|---|
protected java.util.List<ExecutionPhase> |
phases
List of execution phases in which jobs to keep must be.
|
Constructor and Description |
---|
PhasesFilter(ExecutionPhase phase)
Build a
PhasesFilter which will retain only jobs in the given
execution phase. |
Modifier and Type | Method and Description |
---|---|
void |
add(ExecutionPhase phase)
Add the given phase in the list of accepted phases.
|
boolean |
match(UWSJob job)
Tell whether the given job match this filter.
|
protected final java.util.List<ExecutionPhase> phases
public PhasesFilter(ExecutionPhase phase) throws java.lang.NullPointerException
PhasesFilter
which will retain only jobs in the given
execution phase.
More phases can be added into the list of accepted phases thanks to the
function add(ExecutionPhase)
.
phase
- An execution phase on which jobs to retain must be.java.lang.NullPointerException
- If the given phase is NULL.public void add(ExecutionPhase phase)
Note: The given phase is not added into the list if it is already inside.
phase
- An execution phase to add inside the list of accepted
phases.