org.bootchart.common

## Class Process

- java.lang.Object
- - org.bootchart.common.Process

- All Implemented Interfaces:
    java.lang.Comparable

      public class Process
      extends java.lang.Object
      implements java.lang.Comparable

  Process encapsulation.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `boolean` | `active` Whether the process is active.
    `java.util.List` | `childList` A list of children `Process`es.
    `java.lang.String` | `cmd` Command line.
    `java.lang.String` | `desc` Process decription (e.g.
    `long` | `duration` Process duration in milliseconds.
    `Process` | `parent` Parent process.
    `int` | `pid` Process ID.
    `int` | `ppid` Parent process ID.
    `java.util.List` | `samples` A list of process statistics samples.
    `java.util.Date` | `startTime` Process start time.
    `static int` | `STATE_RUNNING` Running state.
    `static int` | `STATE_SLEEPING` Sleeping state.
    `static int` | `STATE_STOPPED` Stopped or traced.
    `static int` | `STATE_UNDEFINED` Undefined state.
    `static int` | `STATE_WAITING` Uninterruptible sleep.
    `static int` | `STATE_ZOMBIE` Zombie state (defunct).

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Process(int pid, java.lang.String cmd)` Created a new process.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `compareTo(java.lang.Object o)`
    `boolean` | `equals(java.lang.Object o)`
    `int` | `hashCode()`
    `java.lang.String` | `toString()` Returns a string representation of the process.

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

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

- - ### Field Detail

    - #### STATE_UNDEFINED

          public static final int STATE_UNDEFINED

      Undefined state.
      See Also:
        Constant Field Values

    - #### STATE_RUNNING

          public static final int STATE_RUNNING

      Running state.
      See Also:
        Constant Field Values

    - #### STATE_SLEEPING

          public static final int STATE_SLEEPING

      Sleeping state.
      See Also:
        Constant Field Values

    - #### STATE_WAITING

          public static final int STATE_WAITING

      Uninterruptible sleep.
      See Also:
        Constant Field Values

    - #### STATE_STOPPED

          public static final int STATE_STOPPED

      Stopped or traced.
      See Also:
        Constant Field Values

    - #### STATE_ZOMBIE

          public static final int STATE_ZOMBIE

      Zombie state (defunct).
      See Also:
        Constant Field Values

    - #### pid

          public int pid

      Process ID.

    - #### cmd

          public java.lang.String cmd

      Command line.

    - #### desc

          public java.lang.String desc

      Process decription (e.g. PID and command, script stack trace, etc.).

    - #### startTime

          public java.util.Date startTime

      Process start time.

    - #### duration

          public long duration

      Process duration in milliseconds.

    - #### parent

          public Process parent

      Parent process.

    - #### ppid

          public int ppid

      Parent process ID.

    - #### childList

          public java.util.List childList

      A list of children `Process`es.

    - #### samples

          public java.util.List samples

      A list of process statistics samples.

    - #### active

          public boolean active

      Whether the process is active. A process is active if it contains at least one non-sleeping sample. Idle processes are optionally filtered out.

  - ### Constructor Detail

    - #### Process

          public Process(int pid,
                         java.lang.String cmd)

      Created a new process.
      Parameters:
        `pid` - process ID
        `cmd` - command line

  - ### Method Detail

    - #### toString

          public java.lang.String toString()

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

    - #### compareTo

          public int compareTo(java.lang.Object o)

      Specified by:
        `compareTo` in interface `java.lang.Comparable`

    - #### equals

          public boolean equals(java.lang.Object o)

      Overrides:
        `equals` in class `java.lang.Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `java.lang.Object`