Class LLMetricsService
java.lang.Object
com.io7m.looseleaf.server.internal.LLMetricsService
- All Implemented Interfaces:
com.io7m.repetoir.core.RPServiceType
A metrics service.
-
Constructor Summary
ConstructorsConstructorDescriptionLLMetricsService(LLDatabaseService inDatabase, LLTelemetryServiceType telemetry) A metrics service. -
Method Summary
Modifier and TypeMethodDescriptionvoidSet the most recent DB time.longdeletes()voidlogAuthError(String address) Log an authentication error.voidlogAuthErrorNamed(LLUserName userName, String address) Log an authentication error.voidLog a delete operation.voidLog an error.voidLog a read operation.voidLog a request.voidLog 4xx response.voidLog 5xx response.voidlogRequestTime(Duration time) Log a request time.voidLog a write operation.longreads()toString()longwrites()
-
Constructor Details
-
LLMetricsService
A metrics service.- Parameters:
inDatabase- The database servicetelemetry- The telemetry service
-
-
Method Details
-
description
- Specified by:
descriptionin interfacecom.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
-
addDBTime
Set the most recent DB time.- Parameters:
time- The time
-
logError
Log an error.- Parameters:
user- The usermessage- The error message
-
logRead
Log a read operation.- Parameters:
user- The userkey- The database key
-
logUpdate
Log a write operation.- Parameters:
user- The userkey- The database key
-
logDelete
Log a delete operation.- Parameters:
user- The userkey- The database key
-
logAuthError
Log an authentication error.- Parameters:
address- The remote host
-
logAuthErrorNamed
Log an authentication error.- Parameters:
userName- The user nameaddress- The remote host
-
logRequestTime
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.
-