com.datadoghq.trace.writer.ListWriter Maven / Gradle / Ivy
package com.datadoghq.trace.writer;
import com.datadoghq.trace.DDBaseSpan;
import com.datadoghq.trace.Service;
import java.util.List;
import java.util.Map;
import java.util.concurrent.CopyOnWriteArrayList;
/** List writer used by tests mostly */
public class ListWriter extends CopyOnWriteArrayList>> implements Writer {
public List>> getList() {
return this;
}
public List> firstTrace() {
return get(0);
}
@Override
public void write(final List> trace) {
add(trace);
}
@Override
public void writeServices(final Map services) {
throw new UnsupportedOperationException();
}
@Override
public void start() {
clear();
}
@Override
public void close() {
clear();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy