public class TraceProcessingDisruptor extends Object
BatchWritingDisruptor
.
publishing to the buffer will not block the calling thread, but instead will return false if the buffer is full. This is to avoid impacting an application thread.
Modifier and Type | Class and Description |
---|---|
static class |
TraceProcessingDisruptor.TraceSerializingHandler |
Modifier and Type | Field and Description |
---|---|
boolean |
running |
Constructor and Description |
---|
TraceProcessingDisruptor(int disruptorSize,
DDAgentApi api,
BatchWritingDisruptor batchWritingDisruptor,
Monitor monitor,
DDAgentWriter writer) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
boolean |
flush(int traceCount)
This method will block until the flush is complete.
|
long |
getCurrentCount() |
long |
getDisruptorCapacity() |
long |
getDisruptorRemainingCapacity() |
boolean |
publish(List<DDSpan> data,
int representativeCount)
Allows the underlying publish to be defined as a blocking or non blocking call.
|
void |
start() |
public TraceProcessingDisruptor(int disruptorSize, DDAgentApi api, BatchWritingDisruptor batchWritingDisruptor, Monitor monitor, DDAgentWriter writer)
public boolean publish(List<DDSpan> data, int representativeCount)
public void start()
public void close()
close
in interface Closeable
close
in interface AutoCloseable
public boolean flush(int traceCount)
traceCount
- - number of unreported traces to include in this batch.public final long getDisruptorCapacity()
public final long getDisruptorRemainingCapacity()
public final long getCurrentCount()