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 Details

    • labels

      protected final Set<String> labels
      The set of labels to exclude.
    • includeFlag

      protected final boolean includeFlag
      Determines whether to include or exclude the snapshots.
  • Constructor Details

    • LabelBasedFilter

      protected LabelBasedFilter(boolean includeFlag, String... labels)
      Initialize with the specified array of labels.
      Parameters:
      includeFlag - determines whether to include or exclude the snapshots.
      labels - the labels to exclude.
    • LabelBasedFilter

      protected LabelBasedFilter(boolean includeFlag, Collection<String> labels)
      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

      public boolean accept(JPPFSnapshot snapshot)
      Description copied from interface: JPPFStatistics.Filter
      Determines whether the specified snapshot is accepted by this filter.
      Specified by:
      accept in interface JPPFStatistics.Filter
      Parameters:
      snapshot - the snapshot to check.
      Returns:
      true if the snapshot is accepted, false otherwise.