Automated g4 rollback of changelist 169922096.

*** Reason for rollback ***

Rolling back to fix []
*** Original change description ***

Remove @Inject annotation in StackDriverWriter

StackDriverWriter is provided by java.google.registry.monitoring.whitebox.StackdriverModule. The @Inject annotation in its constructor is not used. It also uses outdated named binding like @Named(stackdriverGcpProject) which causes confusion because that name is not provided anywhere in the code.

***

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=169931047
This commit is contained in:
shikhman 2017-09-25 11:03:02 -07:00 committed by Ben McIlwain
parent 3ad21e3834
commit f27dd70c9e

View file

@ -57,6 +57,8 @@ import java.util.List;
import java.util.Queue; import java.util.Queue;
import java.util.logging.Logger; import java.util.logging.Logger;
import javax.annotation.concurrent.NotThreadSafe; import javax.annotation.concurrent.NotThreadSafe;
import javax.inject.Inject;
import javax.inject.Named;
import org.joda.time.DateTime; import org.joda.time.DateTime;
import org.joda.time.Interval; import org.joda.time.Interval;
import org.joda.time.format.DateTimeFormatter; import org.joda.time.format.DateTimeFormatter;
@ -138,12 +140,13 @@ public class StackdriverWriter implements MetricWriter {
* <p>The monitoringClient must have read and write permissions to the Cloud Monitoring API v3 on * <p>The monitoringClient must have read and write permissions to the Cloud Monitoring API v3 on
* the provided project. * the provided project.
*/ */
@Inject
public StackdriverWriter( public StackdriverWriter(
Monitoring monitoringClient, Monitoring monitoringClient,
String project, @Named("stackdriverGcpProject") String project,
MonitoredResource monitoredResource, MonitoredResource monitoredResource,
int maxQps, @Named("stackdriverMaxQps") int maxQps,
int maxPointsPerRequest) { @Named("stackdriverMaxPointsPerRequest") int maxPointsPerRequest) {
this.monitoringClient = checkNotNull(monitoringClient); this.monitoringClient = checkNotNull(monitoringClient);
this.projectResource = "projects/" + checkNotNull(project); this.projectResource = "projects/" + checkNotNull(project);
this.monitoredResource = monitoredResource; this.monitoredResource = monitoredResource;