Package 

Class ListWriter

  • All Implemented Interfaces:
    com.datadog.trace.common.writer.Writer , java.io.Closeable , java.io.Serializable , java.lang.AutoCloseable , java.lang.Cloneable , java.lang.Iterable , java.util.Collection , java.util.List , java.util.RandomAccess , java.util.SequencedCollection

    
    public class ListWriter
    extends CopyOnWriteArrayList<List<DDSpan>> implements Writer
                        

    List writer used by tests mostly

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      public interface ListWriter.Filter

      Interface for filtering out select traces from being written.

    • Method Summary

      Modifier and Type Method Description
      AtomicInteger getTraceCount()
      void setFilter(ListWriter.Filter filter) Set a filter to be applied to all incoming traces to determine whether they should be writtenor not.
      List<DDSpan> firstTrace()
      List<DDSpan> secondTrace()
      void write(List<DDSpan> trace) Write a trace represented by the entire list of all the finished spans
      boolean waitForTracesMax(int number, int seconds)
      void waitForTraces(int number)
      void waitUntilReported(DDSpan span)
      void waitUntilReported(DDSpan span, int timeout, TimeUnit unit)
      void incrementDropCounts(int spanCount) Count that a trace was captured for stats, but without reporting it.
      void start() Start the writer
      boolean flush() Requests the writer to send all finished traces and block until complete.
      void close() Indicates to the writer that no future writing will come and it should terminates allconnections and tasks
      String toString()
      • Methods inherited from class java.util.concurrent.CopyOnWriteArrayList

        add, add, addAll, addAllAbsent, addFirst, addIfAbsent, addLast, clear, clone, contains, containsAll, equals, forEach, get, getFirst, getLast, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, remove, remove, removeAll, removeFirst, removeIf, removeLast, replaceAll, retainAll, reversed, set, size, sort, spliterator, subList, toArray, toArray, toString
      • Methods inherited from class java.util.List

        copyOf, of
      • Methods inherited from class java.util.SequencedCollection

        reversed
      • Methods inherited from class java.util.Collection

        parallelStream, stream
      • Methods inherited from class java.lang.Iterable

        iterator, spliterator
      • Methods inherited from class java.io.Closeable

        close
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait