dnet-applications/libs/dnet-broker-apps-common/src/main/java/eu/dnetlib/broker/common/metrics/TotalDatasourcesWithEventsM...

20 lines
490 B
Java

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_datasources_with_events")
public class TotalDatasourcesWithEventsMetric implements MetricInfo {
@Autowired
private MetricsCacheUtils metricsCacheUtils;
@Override
public double obtainValue() {
return metricsCacheUtils.countDatasourcesWithEvents();
}
}