com.streambase.sb.monitor

## Class ThreadInfo

- java.lang.Object
- - com.streambase.sb.monitor.ThreadInfo

- All Implemented Interfaces:
    Cloneable

      public class ThreadInfo
      extends Object
      implements Cloneable

  Represents information about a single thread in a StreamBase Server. Instances of this class should be retrieved from a Snapshot.
  See Also:
    `Snapshot`

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `(package private) boolean` | `isActive`
    `(package private) ThreadInfo` | `prevThr`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ThreadInfo(String n)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `(package private) void` | `calculate(Snapshot ms, SystemInfo si)`
    `(package private) void` | `clear()`
    `Object` | `clone()`
    `(package private) void` | `extractInfo(StatTuple st)` extract thread info from the StatTuple, setting member data as appropriate
    `(package private) void` | `extractInfo(StatTuplev3 st)`
    `String` | `getName()` Returns the name of the thread.
    `double` | `getPercentCPU()` Returns the percent of CPU used by this thread, in microseconds.
    `double` | `getPercentSystem()` Returns the percent of system CPU time used by this thread, in microseconds.
    `double` | `getPercentUser()` Returns the percent of user CPU time used by this thread, in microseconds.
    `int` | `getSystemTimeDelta()` Returns the system time spent by thread since the last Snapshot, in milliseconds.
    `long` | `getSystemTimeDeltaUS()` Returns the system time spent by thread since the last Snapshot, in microseconds.
    `int` | `getSystemTimeTotal()` Returns the system time spent by this thread since the StreamBase Server started, in millisecond.
    `long` | `getSystemTimeTotalUS()` Returns the system time spent by this thread since the StreamBase Server started, in microsecond.
    `int` | `getUserTimeDelta()` Returns the user time spent by thread since the last Snapshot, in millisecond.
    `long` | `getUserTimeDeltaUS()` Returns the user time spent by thread since the last Snapshot, in microsecond.
    `int` | `getUserTimeTotal()` Returns the user time spent by thread since the StreamBase Server started, in millisecond.
    `long` | `getUserTimeTotalUS()` Returns the user time spent by thread since the StreamBase Server started, in microsecond.
    `(package private) void` | `prettyPrint()` Pretty-print a ThreadInfo object to the standard output.
    `(package private) void` | `saveForNextCycle()`
    `String` | `toString()` Returns a string representation of the ThreadInfo object.

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

      `equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### isActive

          boolean isActive

    - #### prevThr

          ThreadInfo prevThr

  - ### Constructor Detail

    - #### ThreadInfo

          ThreadInfo(String n)

  - ### Method Detail

    - #### extractInfo

          void extractInfo(StatTuplev3 st)

    - #### extractInfo

          void extractInfo(StatTuple st)

      extract thread info from the StatTuple, setting member data as appropriate
      Parameters:
        `st` -

    - #### clone

          public Object clone()

      Overrides:
        `clone` in class `Object`

    - #### saveForNextCycle

          void saveForNextCycle()

    - #### calculate

          void calculate(Snapshot ms,
                         SystemInfo si)

    - #### getName

          public String getName()

      Returns the name of the thread.
      Returns:
        the name of the thread

    - #### getUserTimeTotal

          public int getUserTimeTotal()

      Returns the user time spent by thread since the StreamBase Server started, in millisecond.
      Returns:
        the user time spent by thread since the StreamBase Server started

    - #### getUserTimeTotalUS

          public long getUserTimeTotalUS()

      Returns the user time spent by thread since the StreamBase Server started, in microsecond.
      Returns:
        the user time spent by thread since the StreamBase Server started
      Since:
        7.0

    - #### getUserTimeDelta

          public int getUserTimeDelta()

      Returns the user time spent by thread since the last Snapshot, in millisecond.
      Returns:
        the user time spent by thread since the last Snapshot

    - #### getUserTimeDeltaUS

          public long getUserTimeDeltaUS()

      Returns the user time spent by thread since the last Snapshot, in microsecond.
      Returns:
        the user time spent by thread since the last Snapshot
      Since:
        7.0

    - #### getSystemTimeTotal

          public int getSystemTimeTotal()

      Returns the system time spent by this thread since the StreamBase Server started, in millisecond.
      Returns:
        the system time spent by this thread since the StreamBase Server started

    - #### getSystemTimeTotalUS

          public long getSystemTimeTotalUS()

      Returns the system time spent by this thread since the StreamBase Server started, in microsecond.
      Returns:
        the system time spent by this thread since the StreamBase Server started
      Since:
        7.0

    - #### getSystemTimeDelta

          public int getSystemTimeDelta()

      Returns the system time spent by thread since the last Snapshot, in milliseconds.
      Returns:
        the system time spent by thread since the last Snapshot

    - #### getSystemTimeDeltaUS

          public long getSystemTimeDeltaUS()

      Returns the system time spent by thread since the last Snapshot, in microseconds.
      Returns:
        the system time spent by thread since the last Snapshot
      Since:
        7.0

    - #### getPercentCPU

          public double getPercentCPU()

      Returns the percent of CPU used by this thread, in microseconds.
      Returns:
        the percent of CPU used by this thread

    - #### getPercentUser

          public double getPercentUser()

      Returns the percent of user CPU time used by this thread, in microseconds.
      Returns:
        the percent of user CPU time used by this thread

    - #### getPercentSystem

          public double getPercentSystem()

      Returns the percent of system CPU time used by this thread, in microseconds.
      Returns:
        the percent of system CPU time used by this thread

    - #### toString

          public String toString()

      Returns a string representation of the ThreadInfo object.
      Overrides:
        `toString` in class `Object`
      Returns:
        a string representation of the object.

    - #### prettyPrint

          void prettyPrint()

      Pretty-print a ThreadInfo object to the standard output.

    - #### clear

          void clear()

Copyright © 2015–2018 Cloud Software Group, Inc.. All rights reserved.