Interface StatusReporter.StatusItem

Enclosing interface:
StatusReporter

public static interface StatusReporter.StatusItem
An interface that can be used to efficiently update the value associated with a single status key. Only one StatusItem instance can exist for a given key. This object is thread-safe. Ensure that no methods are called this object after the plug-in has been shutdown.
  • Method Summary

    Modifier and Type
    Method
    Description
    Get the unique key specified when this status item was created
    Return the value this status item was set to most recently by this class.
    void
    Set an integer status value by incrementing the previous integer value that was set by this object.
    void
    increment(long incrementValue)
    Set an integer status value by incrementing the previous integer value that was set by this object.
    void
    setStatus(long value)
    Set an integer status value.
    void
    Set a string status value.
  • Method Details

    • setStatus

      void setStatus(String value)
      Set a string status value.
      Parameters:
      value - the value to set e.g. StatusReporter.STATUS_ONLINE, StatusReporter.STATUS_ONLINE, StatusReporter.STATUS_FAILED. Must not be null.
    • setStatus

      void setStatus(long value)
      Set an integer status value. This is a convenience method that converts an integer value into a string automatically.
      Parameters:
      value - the value to set
    • getStatus

      String getStatus()
      Return the value this status item was set to most recently by this class.
      Returns:
      The last value this was set to.
    • increment

      void increment()
      Set an integer status value by incrementing the previous integer value that was set by this object.
    • increment

      void increment(long incrementValue)
      Set an integer status value by incrementing the previous integer value that was set by this object.
      Parameters:
      incrementValue - the value to add on to the current value and set as the status. This can be a negative number.
    • getKey

      String getKey()
      Get the unique key specified when this status item was created