aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-telemetry-core/src
diff options
context:
space:
mode:
authorlukasz-jarocki-sonarsource <lukasz.jarocki@sonarsource.com>2024-09-06 08:47:33 +0200
committersonartech <sonartech@sonarsource.com>2024-09-06 20:02:37 +0000
commitcd40a38f951a1355c086b99017401b93bd203558 (patch)
treeb8c9fe11385b7951a637cf2a5ce6c4ab091f38bc /server/sonar-telemetry-core/src
parent0996c6186cfeb8e2c763d2f174b26ab276b232f7 (diff)
downloadsonarqube-cd40a38f951a1355c086b99017401b93bd203558.tar.gz
sonarqube-cd40a38f951a1355c086b99017401b93bd203558.zip
SONAR-22891 added new telemetry metric
Diffstat (limited to 'server/sonar-telemetry-core/src')
-rw-r--r--server/sonar-telemetry-core/src/main/java/org/sonar/telemetry/core/TelemetryDataProvider.java14
1 files changed, 7 insertions, 7 deletions
diff --git a/server/sonar-telemetry-core/src/main/java/org/sonar/telemetry/core/TelemetryDataProvider.java b/server/sonar-telemetry-core/src/main/java/org/sonar/telemetry/core/TelemetryDataProvider.java
index b91453f3aa3..8829701c4b1 100644
--- a/server/sonar-telemetry-core/src/main/java/org/sonar/telemetry/core/TelemetryDataProvider.java
+++ b/server/sonar-telemetry-core/src/main/java/org/sonar/telemetry/core/TelemetryDataProvider.java
@@ -58,23 +58,23 @@ public interface TelemetryDataProvider<T> {
/**
* The implementation of this method might often need to make a call to a database.
- * For each metric either this method or {@link TelemetryDataProvider#getUuidValues()} should be implemented and used. Not both at once.
+ * For each metric either this method or {@link TelemetryDataProvider#getValues()} should be used. Not both at once.
*
* @return the value of the data provided by this instance.
*/
default Optional<T> getValue() {
- throw new IllegalStateException("Not implemented");
+ return Optional.empty();
}
/**
* The implementation of this method might often need to make a call to a database.
- * Similiar as {@link TelemetryDataProvider#getValue()} this method returns values of the metric. Some of the metrics
- * associate a UUID with a value. This method is used to return all the values associated with the UUIDs.
+ * Similar as {@link TelemetryDataProvider#getValue()} this method returns values of the metric. Some of the metrics
+ * associate a key with a value. This method is used to return all the values associated with the keys.
*
- * @return map of UUIDs and their values.
+ * @return map of keys and their values.
*/
- default Map<String, T> getUuidValues() {
- throw new IllegalStateException("Not implemented");
+ default Map<String, T> getValues() {
+ return Map.of();
}
/**