Interface MetricsData

All Superinterfaces:
AutoCloseable, Closeable

public interface MetricsData extends Closeable
  • Field Details

    • NO_METRICS

      static final Mode.Key<Boolean> NO_METRICS
      If this mode is passed to the CommandService, no metrics will be persisted for that task.
  • Method Details

    • queryCount

      int queryCount()
      Returns:
      the number of database queries executed during this action
    • totalQueryTime

      long totalQueryTime()
      Returns:
      the total time used executing queries using this action in milliseconds
    • totalTime

      long totalTime()
      Returns:
      the total time used to execute this action
    • close

      void close()
      Stop collecting metrics and persist the result (if it passes the thresholds)
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
    • getActivityType

      ActivityType getActivityType()
    • getActivityName

      String getActivityName()
    • getActivityDetails

      String getActivityDetails()
    • getCategoryData

      CategoryData getCategoryData()
    • getRequestId

      @Nullable @Nullable String getRequestId()
    • getRequestOrigin

      @Nullable @Nullable String getRequestOrigin()
    • setException

      void setException(Exception exception)
    • getException

      @Nullable @Nullable Exception getException()