mirror of
https://github.com/google/nomulus
synced 2026-07-28 11:02:47 +00:00
Remove injectable constructors in metrics library
Users of the client library should be responsible for providing the bindings required. By removing the injectable constructors and named bindings in their parameters, the client library is no longer forcing its users to provide bindings with specific named annotations. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=170490834
This commit is contained in:
@@ -30,8 +30,6 @@ import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.TimeoutException;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Named;
|
||||
|
||||
/**
|
||||
* Engine to write metrics to a {@link MetricWriter} on a regular periodic basis.
|
||||
@@ -57,11 +55,8 @@ public class MetricReporter extends AbstractScheduledService {
|
||||
* @param writeInterval time period between metric writes, in seconds.
|
||||
* @param threadFactory factory to use when creating background threads.
|
||||
*/
|
||||
@Inject
|
||||
public MetricReporter(
|
||||
MetricWriter metricWriter,
|
||||
@Named("metricsWriteInterval") long writeInterval,
|
||||
@Named("metricsBackgroundThreadFactory") ThreadFactory threadFactory) {
|
||||
MetricWriter metricWriter, long writeInterval, ThreadFactory threadFactory) {
|
||||
this(
|
||||
metricWriter,
|
||||
writeInterval,
|
||||
|
||||
Reference in New Issue
Block a user