Interface SampleConsumer

All Superinterfaces:
All Known Implementing Classes:
AbstractGraphConsumer, AbstractOverTimeGraphConsumer, AbstractSampleConsumer, AbstractSummaryConsumer, AbstractVersusRequestsGraphConsumer, ActiveThreadsGraphConsumer, AggregateConsumer, ApdexSummaryConsumer, BytesThroughputGraphConsumer, CodesPerSecondGraphConsumer, ConnectTimeOverTimeGraphConsumer, CustomGraphConsumer, ErrorsSummaryConsumer, ExternalSampleSorter, FilterConsumer, HitsPerSecondGraphConsumer, LatencyOverTimeGraphConsumer, LatencyVSRequestGraphConsumer, NormalizerSampleConsumer, RequestsSummaryConsumer, ResponseCustomGraphGraphConsumer, ResponseTimeDistributionGraphConsumer, ResponseTimeOverTimeGraphConsumer, ResponseTimePercentilesGraphConsumer, ResponseTimePercentilesOverTimeGraphConsumer, ResponseTimePerSampleGraphConsumer, ResponseTimeVSRequestGraphConsumer, SampleWriterConsumer, StatisticsSummaryConsumer, SyntheticResponseTimeDistributionGraphConsumer, TaggerConsumer, TimeVSThreadGraphConsumer, Top5ErrorsBySamplerConsumer, TotalTPSGraphConsumer, TransactionsPerSecondGraphConsumer

public interface SampleConsumer extends SampleProcessor
Defines a sample consumer

A sample consumer is meant to consume samples in order to process them.

A sample consumer can consume samples on different channels and each channel is assigned a single metadata structure.

A sample consumer is passive, meaning that its consume() service must be called by a third party object.

Sample metadata must be provided to the consumer before startConsuming() is called.

The following sequence must be observed when consuming samples :

  • Call setConsumedMetadata() for each channel that will consume samples
  • Call startConsuming() before any call to consume()
  • Call consume() for each sample to be consumed by the consumer, specify the channel on which to consume
  • Call stopConsuming() after every sample has been consumed
  • Method Details

    • setConsumedMetadata

      void setConsumedMetadata(SampleMetadata sampleMetadata, int channel)
      Set the metadata of samples that will be consumed on the specified channel.
      sampleMetadata - The sample metadata that are being consumed for the associated channel
      channel - The channel whose sample metadata are being defined
    • startConsuming

      void startConsuming()
      Start the sample consuming. This step is used by consumer to initialize their process.
    • consume

      void consume(Sample s, int channel)
      Consumes the specified sample ton the specified channel.
      s - The sample to be consumed
      channel - The channel on which the sample is consumed
    • stopConsuming

      void stopConsuming()
      Stops the consuming process. No sample will be processed after this service has been called.