Interface BusinessScore

All Known Implementing Classes:
BusinessScoreImpl

public interface BusinessScore
The business score of the current application.

Quarkus provides a CDI bean with the Singleton scope that implements this interface.

  • Method Details

    • score

      void score(int value, String... labels)
      Increase the business score.
      Parameters:
      value -
      labels -
      See Also:
    • reset

      void reset()
      Reset the score, i.e. remove all score records.
      See Also:
    • getCurrent

      long getCurrent()
      Returns:
      the sum of all score records in the current time window
      See Also:
    • test

      Check the "zombie" status of the current application. An application is considered a zombie if the current score is below the current zombie threshold in the current time window. Note that BusinessScore.ZombieStatus.isZombie returns false if the application did not run for at least a duration of the current time window.
      Returns:
      the zombie status
      See Also:
    • getZombieThreshold

      long getZombieThreshold()
      The point at which the application is considered a zombie.
      Returns:
      the threshold
    • setZombieThreshold

      void setZombieThreshold(long value)
      Parameters:
      value -
    • getTimeWindow

      Duration getTimeWindow()
      The amount of time a score record is kept alive.
      Returns:
      the time window
    • setTimeWindow

      void setTimeWindow(Duration value)
      Parameters:
      value -
    • getCurrentRecords

      List<BusinessScore.Score> getCurrentRecords()
      Returns:
      the list of records in the current time window