Class TaggerConsumer<TIndex>

Type Parameters:
TIndex - the generic type
All Implemented Interfaces:
SampleConsumer, SampleProcessor, SampleProducer

public class TaggerConsumer<TIndex> extends AbstractSampleConsumer
The Class TimeCountConsumer adds a data field to the samples it consumes. The new field is identified by the value of tagLabel in the sample metadata.
Since:
3.0
  • Field Details

  • Constructor Details

    • TaggerConsumer

      public TaggerConsumer()
  • Method Details

    • getTagLabel

      public final String getTagLabel()
      Gets the label of the tag used by this consumer.
      Returns:
      the label of the tag used by this consumer.
    • setTagLabel

      public final void setTagLabel(String tagLabel)
    • getSampleIndexer

      public final SampleIndexer<TIndex> getSampleIndexer()
    • setSampleIndexer

      public final void setSampleIndexer(SampleIndexer<TIndex> sampleIndexer)
    • startConsuming

      public void startConsuming()
      Description copied from interface: SampleConsumer
      Start the sample consuming. This step is used by consumer to initialize their process.
    • consume

      public void consume(Sample sample, int channel)
      Description copied from interface: SampleConsumer
      Consumes the specified sample ton the specified channel.
      Parameters:
      sample - The sample to be consumed
      channel - The channel on which the sample is consumed
    • stopConsuming

      public void stopConsuming()
      Description copied from interface: SampleConsumer
      Stops the consuming process. No sample will be processed after this service has been called.