Package org.jppf.utils.stats
Class JPPFSnapshot.LabelBasedFilter
java.lang.Object
org.jppf.utils.stats.JPPFSnapshot.LabelBasedFilter
- All Implemented Interfaces:
JPPFStatistics.Filter
- Direct Known Subclasses:
JPPFSnapshot.LabelExcludingFilter,JPPFSnapshot.LabelIncludingFilter
- Enclosing interface:
- JPPFSnapshot
public abstract static class JPPFSnapshot.LabelBasedFilter
extends Object
implements JPPFStatistics.Filter
Base class for filters including or excluding snpashots based on a provided set of labels.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final booleanDetermines whether to include or exclude the snapshots.The set of labels to exclude. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedLabelBasedFilter(boolean includeFlag, String... labels) Initialize with the specified array of labels.protectedLabelBasedFilter(boolean includeFlag, Collection<String> labels) Initialize with the specified collection of labels. -
Method Summary
Modifier and TypeMethodDescriptionbooleanaccept(JPPFSnapshot snapshot) Determines whether the specified snapshot is accepted by this filter.
-
Field Details
-
labels
The set of labels to exclude. -
includeFlag
protected final boolean includeFlagDetermines whether to include or exclude the snapshots.
-
-
Constructor Details
-
LabelBasedFilter
Initialize with the specified array of labels.- Parameters:
includeFlag- determines whether to include or exclude the snapshots.labels- the labels to exclude.
-
LabelBasedFilter
Initialize with the specified collection of labels.- Parameters:
includeFlag- determines whether to include or exclude the snapshots.labels- the labels to exclude.
-
-
Method Details
-
accept
Description copied from interface:JPPFStatistics.FilterDetermines whether the specified snapshot is accepted by this filter.- Specified by:
acceptin interfaceJPPFStatistics.Filter- Parameters:
snapshot- the snapshot to check.- Returns:
trueif the snapshot is accepted,falseotherwise.
-