Interface ResultProcessor<C,E>

Type Parameters:
C - The result type which acts as the container of elements
E - The element type
All Known Subinterfaces:
ResultSetProcessor
All Known Implementing Classes:
Cqld4PrintProcessor, CqlFieldCaptureProcessor, RSIterableCapture, RSProcessors

public interface ResultProcessor<C,E>
A result processor can consume data from a result which is contains of a set of ordered elements.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    buffer(E element)
    For each element in the container, buffer it.
    void
    Once all the elements of the result have been buffered, flush must be called.
    void
    start(long cycle, C container)
    Call the start method before any buffering of results.
  • Method Details

    • start

      void start(long cycle, C container)
      Call the start method before any buffering of results.
      Parameters:
      cycle - The cycle that the result is associated with. This is for presentation only.
      container - The result object which holds individual result elements.
    • buffer

      void buffer(E element)
      For each element in the container, buffer it. The effect of buffering is contextual. For ResultProcessors which need to see all the result data before applying its effect, simply buffer the elements to an internal container type.
      Parameters:
      element -
    • flush

      void flush()
      Once all the elements of the result have been buffered, flush must be called. ResultProcessors which need to see all the data can finish processing here.