2021-07-30 14:12:09 +02:00
|
|
|
package eu.dnetlib.broker.common.metrics;
|
|
|
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
|
|
import eu.dnetlib.common.metrics.MetricInfo;
|
|
|
|
|
|
|
|
@Component("provide_broker_subscriptions")
|
2021-11-29 13:37:27 +01:00
|
|
|
public class TotalSubscriptionsMetric implements MetricInfo {
|
2021-07-30 14:12:09 +02:00
|
|
|
|
|
|
|
@Autowired
|
2021-07-30 16:17:20 +02:00
|
|
|
private MetricsCacheUtils metricsCacheUtils;
|
2021-07-30 14:12:09 +02:00
|
|
|
|
|
|
|
@Override
|
2021-07-30 16:17:20 +02:00
|
|
|
public double obtainValue() {
|
|
|
|
return metricsCacheUtils.countSubscriptions();
|
2021-07-30 14:12:09 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|