Class LLMetricsService

java.lang.Object
com.io7m.looseleaf.server.internal.LLMetricsService
All Implemented Interfaces:
com.io7m.repetoir.core.RPServiceType

public final class LLMetricsService extends Object implements com.io7m.repetoir.core.RPServiceType
A metrics service.
  • Constructor Details

    • LLMetricsService

      public LLMetricsService(LLDatabaseService inDatabase, LLTelemetryServiceType telemetry)
      A metrics service.
      Parameters:
      inDatabase - The database service
      telemetry - The telemetry service
  • Method Details

    • description

      public String description()
      Specified by:
      description in interface com.io7m.repetoir.core.RPServiceType
    • reads

      public long reads()
      Returns:
      The number of reads so far
    • writes

      public long writes()
      Returns:
      The number of writes so far
    • deletes

      public long deletes()
      Returns:
      The number of deletes so far
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • addDBTime

      public void addDBTime(Duration time)
      Set the most recent DB time.
      Parameters:
      time - The time
    • logError

      public void logError(LLUser user, String message)
      Log an error.
      Parameters:
      user - The user
      message - The error message
    • logRead

      public void logRead(LLUser user, String key)
      Log a read operation.
      Parameters:
      user - The user
      key - The database key
    • logUpdate

      public void logUpdate(LLUser user, String key)
      Log a write operation.
      Parameters:
      user - The user
      key - The database key
    • logDelete

      public void logDelete(LLUser user, String key)
      Log a delete operation.
      Parameters:
      user - The user
      key - The database key
    • logAuthError

      public void logAuthError(String address)
      Log an authentication error.
      Parameters:
      address - The remote host
    • logAuthErrorNamed

      public void logAuthErrorNamed(LLUserName userName, String address)
      Log an authentication error.
      Parameters:
      userName - The user name
      address - The remote host
    • logRequestTime

      public void logRequestTime(Duration time)
      Log a request time.
      Parameters:
      time - The time
    • logRequest4xx

      public void logRequest4xx()
      Log 4xx response.
    • logRequest5xx

      public void logRequest5xx()
      Log 5xx response.
    • logRequest

      public void logRequest()
      Log a request.