[PR #1] making fields private

This commit is contained in:
Guillaume Polaert 2017-05-02 16:53:54 +02:00
parent 3fa20e3106
commit c9ea5c0c5d
1 changed files with 9 additions and 12 deletions

View File

@ -1,19 +1,16 @@
package com.datadoghq.trace.writer.impl; package com.datadoghq.trace.writer.impl;
import com.datadoghq.trace.Writer;
import io.opentracing.Span;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.concurrent.ArrayBlockingQueue; import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.BlockingQueue; import java.util.concurrent.BlockingQueue;
import java.util.concurrent.Semaphore; import java.util.concurrent.Semaphore;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.datadoghq.trace.Writer;
import com.datadoghq.trace.impl.DDSpan;
import io.opentracing.Span;
/** /**
* This writer write provided traces to the a DD agent which is most of time located on the same host. * This writer write provided traces to the a DD agent which is most of time located on the same host.
* *
@ -22,7 +19,7 @@ import io.opentracing.Span;
*/ */
public class DDAgentWriter implements Writer { public class DDAgentWriter implements Writer {
protected static final Logger logger = LoggerFactory.getLogger(DDAgentWriter.class.getName()); private static final Logger logger = LoggerFactory.getLogger(DDAgentWriter.class.getName());
/** /**
* Default location of the DD agent * Default location of the DD agent
@ -48,17 +45,17 @@ public class DDAgentWriter implements Writer {
/** /**
* In memory collection of traces waiting for departure * In memory collection of traces waiting for departure
*/ */
protected final BlockingQueue<List<Span>> traces; private final BlockingQueue<List<Span>> traces;
/** /**
* Async worker that posts the spans to the DD agent * Async worker that posts the spans to the DD agent
*/ */
protected final Thread asyncWriterThread; private final Thread asyncWriterThread;
/** /**
* The DD agent api * The DD agent api
*/ */
protected final DDApi api; private final DDApi api;
public DDAgentWriter() { public DDAgentWriter() {
this(new DDApi(DEFAULT_HOSTNAME, DEFAULT_PORT)); this(new DDApi(DEFAULT_HOSTNAME, DEFAULT_PORT));