Package org.jppf.job

Interface JobSelector

All Superinterfaces:
Serializable
All Known Implementing Classes:
AllJobsSelector, AtLeastJobSelector, AtMostJobSelector, BetweenEEJobSelector, BetweenEIJobSelector, BetweenIEJobSelector, BetweenIIJobSelector, ContainsJobSelector, EqualsJobSelector, IsOneOfJobSelector, JobNameSelector, JobUuidSelector, LessThanJobSelector, MoreThanJobSelector, NotEqualsJobSelector, RegexJobSelector, ScriptedJobSelector

public interface JobSelector extends Serializable
Interface used to select or filter jobs in a client, driver or node.
Since:
5.1
Author:
Laurent Cohen
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final JobSelector
    A predefined singleton for AllJobsSelector.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Determine whether the specified job is accepted by this selector.
    default JobSelector
    and(JobSelector... others)
    Obtain a job selector that realizes a logical "and" operation on this selector and an other.
    default JobSelector
    Negate this job selector.
    not(JobSelector selector)
    Return a negation of the specified job selector.
    default JobSelector
    or(JobSelector others)
    Obtain a job selector that realizes a logical "or" operation on this selector and an other.
    default JobSelector
    Obtain a job selector that realizes a logical "xor" operation on this selector and an other.
  • Field Details

  • Method Details

    • accepts

      boolean accepts(JPPFDistributedJob job)
      Determine whether the specified job is accepted by this selector.
      Parameters:
      job - the job to check.
      Returns:
      true if the job is acepted, false otherwise.
    • negate

      default JobSelector negate()
      Negate this job selector.
      Returns:
      a JobSelector which negates this selector.
      Since:
      6.2
    • not

      static JobSelector not(JobSelector selector)
      Return a negation of the specified job selector. This convenience method is equivalent to calling selector.negate().
      Parameters:
      selector - the selector to negate.
      Returns:
      a job selector that realizes a logical "not" operation on this selector.
      Since:
      6.2
    • and

      default JobSelector and(JobSelector... others) throws NullPointerException
      Obtain a job selector that realizes a logical "and" operation on this selector and an other.
      Parameters:
      others - the other selectors to combine with.
      Returns:
      a JobSelector which combines this selector and the other with an "and" operator.
      Throws:
      NullPointerException - if other is null.
      Since:
      6.2
    • or

      default JobSelector or(JobSelector others) throws NullPointerException
      Obtain a job selector that realizes a logical "or" operation on this selector and an other.
      Parameters:
      others - the other selectors to combine with.
      Returns:
      a JobSelector which combines this selector and the other with an "or" operator.
      Throws:
      NullPointerException - if other is null.
      Since:
      6.2
    • xor

      default JobSelector xor(JobSelector other) throws NullPointerException
      Obtain a job selector that realizes a logical "xor" operation on this selector and an other.
      Parameters:
      other - the other selector to combine with.
      Returns:
      a JobSelector which combines this selector and the other with an "xor" operator.
      Throws:
      NullPointerException - if other is null.
      Since:
      6.2