com.sun.grid.jgdi.monitoring.filter

## Class JobStateFilter

- java.lang.Object
- - com.sun.grid.jgdi.monitoring.filter.JobStateFilter

- All Implemented Interfaces:
    java.io.Serializable

      public class JobStateFilter
      extends java.lang.Object
      implements java.io.Serializable

  This class build a job state filter.
  See Also:
    Serialized Form

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `JobStateFilter.State`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static JobStateFilter.State` | `ALL` This state includes a other states besides `ZOMBIE`.
    `static JobStateFilter.State` | `HOLD` This state includes `HOLD_USER`, `HOLD_OPERATOR`, `HOLD_SYSTEM`, `HOLD_JOBARRAYHOLD`, `HOLD_JOBHOLD` and `HOLD_STARTTIMEHOLD`
    `static JobStateFilter.State` | `HOLD_JOBARRAYHOLD` Jobs in the state hold job array job (`qstat -s hd`)
    `static JobStateFilter.State` | `HOLD_JOBHOLD` Jobs in the state hold job hold (`qstat -s hj`)
    `static JobStateFilter.State` | `HOLD_OPERATOR` Jobs in the state hold operator (`qstat -s ho`)
    `static JobStateFilter.State` | `HOLD_STARTTIMEHOLD` Jobs in the state hold job hold (`qstat -s hj`)
    `static JobStateFilter.State` | `HOLD_SYSTEM` Jobs in the state hold system (`qstat -s hs`)
    `static JobStateFilter.State` | `HOLD_USER` Jobs in the state hold user (`qstat -s hu`)
    `static JobStateFilter.State` | `PENDING` Pending jobs (`qstat -s p`)
    `static JobStateFilter.State` | `RUNNING` Running jobs (`qstat -s r`)
    `static JobStateFilter.State` | `SUSPENDED` Suspended jobs (`qstat -s r`)
    `static JobStateFilter.State` | `ZOMBIE` Zombie jobs.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `JobStateFilter()`
    `JobStateFilter(JobStateFilter.State[] states)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(java.lang.Object obj)` Determine of this is equal to `obj`.
    `void` | `exclude(JobStateFilter.State state)`
    `static JobStateFilter` | `fill(java.lang.String stateString)` Parse a job state string.
    `int` | `getStates()`
    `java.lang.String` | `getStateString()` Get the state string as it can be used for qstat
    `int` | `hashCode()` Get the hashcode of this object
    `boolean` | `isSet(JobStateFilter.State state)` Determine if jobs in a specific state are included.
    `static JobStateFilter` | `parse(java.lang.String stateString)` Parse a job state string.
    `void` | `set(JobStateFilter.State state, boolean flag)` Include/Exclude jobs in specific state
    `void` | `setStates(int mask)`
    `java.lang.String` | `toString()` Get a string representation of this object

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### HOLD_USER

          public static final JobStateFilter.State HOLD_USER

      Jobs in the state hold user (`qstat -s hu`)

    - #### HOLD_OPERATOR

          public static final JobStateFilter.State HOLD_OPERATOR

      Jobs in the state hold operator (`qstat -s ho`)

    - #### HOLD_SYSTEM

          public static final JobStateFilter.State HOLD_SYSTEM

      Jobs in the state hold system (`qstat -s hs`)

    - #### PENDING

          public static final JobStateFilter.State PENDING

      Pending jobs (`qstat -s p`)

    - #### RUNNING

          public static final JobStateFilter.State RUNNING

      Running jobs (`qstat -s r`)

    - #### SUSPENDED

          public static final JobStateFilter.State SUSPENDED

      Suspended jobs (`qstat -s r`)

    - #### ZOMBIE

          public static final JobStateFilter.State ZOMBIE

      Zombie jobs. (`qstat -s z`)

    - #### HOLD_JOBARRAYHOLD

          public static final JobStateFilter.State HOLD_JOBARRAYHOLD

      Jobs in the state hold job array job (`qstat -s hd`)

    - #### HOLD_JOBHOLD

          public static final JobStateFilter.State HOLD_JOBHOLD

      Jobs in the state hold job hold (`qstat -s hj`)

    - #### HOLD_STARTTIMEHOLD

          public static final JobStateFilter.State HOLD_STARTTIMEHOLD

      Jobs in the state hold job hold (`qstat -s hj`)

    - #### HOLD

          public static final JobStateFilter.State HOLD

      This state includes `HOLD_USER`, `HOLD_OPERATOR`, `HOLD_SYSTEM`, `HOLD_JOBARRAYHOLD`, `HOLD_JOBHOLD` and `HOLD_STARTTIMEHOLD`

    - #### ALL

          public static final JobStateFilter.State ALL

      This state includes a other states besides `ZOMBIE`. Same as `qstat -s a` or `qstat -s prsh`

  - ### Constructor Detail

    - #### JobStateFilter

          public JobStateFilter(JobStateFilter.State[] states)

    - #### JobStateFilter

          public JobStateFilter()

  - ### Method Detail

    - #### parse

          public static JobStateFilter parse(java.lang.String stateString)

      Parse a job state string.
      Parameters:
        `stateString` - the job state string
      Returns:
        the job state

    - #### fill

          public static JobStateFilter fill(java.lang.String stateString)

      Parse a job state string.
      Parameters:
        `stateString` - the job state string
      Returns:
        the job state

    - #### setStates

          public void setStates(int mask)

    - #### getStates

          public int getStates()

    - #### exclude

          public void exclude(JobStateFilter.State state)

    - #### set

          public void set(JobStateFilter.State state,
                          boolean flag)

      Include/Exclude jobs in specific state
      Parameters:
        `state` - the state
        `flag` - if `true` jobs in the state are included else they are excluded

    - #### isSet

          public boolean isSet(JobStateFilter.State state)

      Determine if jobs in a specific state are included.
      Returns:
        `true` if jobs in the specific state are includes

    - #### getStateString

          public java.lang.String getStateString()

      Get the state string as it can be used for qstat
      Returns:
        the state string

    - #### equals

          public boolean equals(java.lang.Object obj)

      Determine of this is equal to `obj`. Two `JobStateFilter` objects are equals if they include exactly the same jobs states
      Overrides:
        `equals` in class `java.lang.Object`
      Parameters:
        `obj` - the obj
      Returns:
        `true` if obj is equal to this

    - #### hashCode

          public int hashCode()

      Get the hashcode of this object
      Overrides:
        `hashCode` in class `java.lang.Object`
      Returns:
        the hashcode

    - #### toString

          public java.lang.String toString()

      Get a string representation of this object
      Overrides:
        `toString` in class `java.lang.Object`
      Returns:
        the string representation

Copyright © 2007 Sun Microsystems, Inc. All rights reserved.