Class FlowReader

  • All Implemented Interfaces:
    AutoCloseable

    public class FlowReader
    extends org.apache.beam.sdk.io.UnboundedSource.UnboundedReader<org.opennms.netmgt.flows.persistence.model.FlowDocument>
    Allows to repeatedly advance to the next flow and gives access to the current watermark. Created by a SyntheticFlowSource for reading flows.
    • Field Detail

      • index

        protected long index
    • Method Detail

      • start

        public boolean start()
                      throws IOException
        Specified by:
        start in class org.apache.beam.sdk.io.UnboundedSource.UnboundedReader<org.opennms.netmgt.flows.persistence.model.FlowDocument>
        Throws:
        IOException
      • advance

        public boolean advance()
                        throws IOException
        Specified by:
        advance in class org.apache.beam.sdk.io.UnboundedSource.UnboundedReader<org.opennms.netmgt.flows.persistence.model.FlowDocument>
        Throws:
        IOException
      • getWatermark

        public org.joda.time.Instant getWatermark()
        Specified by:
        getWatermark in class org.apache.beam.sdk.io.UnboundedSource.UnboundedReader<org.opennms.netmgt.flows.persistence.model.FlowDocument>
      • getCheckpointMark

        public org.apache.beam.sdk.io.UnboundedSource.CheckpointMark getCheckpointMark()
        Specified by:
        getCheckpointMark in class org.apache.beam.sdk.io.UnboundedSource.UnboundedReader<org.opennms.netmgt.flows.persistence.model.FlowDocument>
      • getCurrentSource

        public org.apache.beam.sdk.io.UnboundedSource<org.opennms.netmgt.flows.persistence.model.FlowDocument,​?> getCurrentSource()
        Specified by:
        getCurrentSource in class org.apache.beam.sdk.io.UnboundedSource.UnboundedReader<org.opennms.netmgt.flows.persistence.model.FlowDocument>
      • getCurrent

        public org.opennms.netmgt.flows.persistence.model.FlowDocument getCurrent()
                                                                           throws NoSuchElementException
        Specified by:
        getCurrent in class org.apache.beam.sdk.io.Source.Reader<org.opennms.netmgt.flows.persistence.model.FlowDocument>
        Throws:
        NoSuchElementException
      • getCurrentTimestamp

        public org.joda.time.Instant getCurrentTimestamp()
                                                  throws NoSuchElementException
        Specified by:
        getCurrentTimestamp in class org.apache.beam.sdk.io.Source.Reader<org.opennms.netmgt.flows.persistence.model.FlowDocument>
        Throws:
        NoSuchElementException
      • close

        public void close()
                   throws IOException
        Specified by:
        close in interface AutoCloseable
        Specified by:
        close in class org.apache.beam.sdk.io.Source.Reader<org.opennms.netmgt.flows.persistence.model.FlowDocument>
        Throws:
        IOException