Package gorsat

Class BatchedPipeStepIteratorAdaptor

  • All Implemented Interfaces:
    java.lang.AutoCloseable, java.util.Iterator<org.gorpipe.gor.model.Row>, java.util.Spliterator<org.gorpipe.gor.model.Row>, org.gorpipe.gor.model.GenomicIterator, org.gorpipe.gor.model.RowSourceStats

    public class BatchedPipeStepIteratorAdaptor
    extends org.gorpipe.gor.model.GenomicIteratorBase
    implements java.util.Spliterator<org.gorpipe.gor.model.Row>
    Created by sigmar on 05/05/2017.
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface java.util.Spliterator

        java.util.Spliterator.OfDouble, java.util.Spliterator.OfInt, java.util.Spliterator.OfLong, java.util.Spliterator.OfPrimitive<T extends java.lang.Object,​T_CONS extends java.lang.Object,​T_SPLITR extends java.util.Spliterator.OfPrimitive<T,​T_CONS,​T_SPLITR>>
    • Field Summary

      • Fields inherited from class org.gorpipe.gor.model.GenomicIteratorBase

        statsSenderAnnotation, statsSenderName
      • Fields inherited from interface java.util.Spliterator

        CONCURRENT, DISTINCT, IMMUTABLE, NONNULL, ORDERED, SIZED, SORTED, SUBSIZED
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int characteristics()  
      BatchedPipeStepIteratorAdaptor clone()  
      void close()  
      long estimateSize()  
      void forEachRemaining​(java.util.function.Consumer<? super org.gorpipe.gor.model.Row> action)  
      double getAvgBasesPerMilliSecond()  
      double getAvgBatchSize()  
      double getAvgRowsPerMilliSecond()  
      java.util.Comparator<org.gorpipe.gor.model.Row> getComparator()  
      int getCurrentBatchLoc()  
      org.gorpipe.gor.model.Row getCurrentBatchRow​(int i)  
      int getCurrentBatchSize()  
      java.lang.Throwable getEx()  
      java.util.stream.Stream<org.gorpipe.gor.model.Row> getStream()  
      java.util.stream.Stream<org.gorpipe.gor.model.Row> getStream​(boolean parallel)  
      boolean hasNext()  
      boolean isBuffered()  
      org.gorpipe.gor.model.Row next()  
      void remove()  
      boolean seek​(java.lang.String seekChr, int seekPos)  
      void setCurrentChrom​(java.lang.String chrom)  
      void setEx​(java.lang.Throwable throwable)  
      java.lang.String toString()  
      boolean tryAdvance​(java.util.function.Consumer<? super org.gorpipe.gor.model.Row> action)  
      java.util.Spliterator<org.gorpipe.gor.model.Row> trySplit()  
      void updateTimeMeasurement​(long deltaTimeNs, RowBuffer current)  
      • Methods inherited from class org.gorpipe.gor.model.GenomicIteratorBase

        decStat, getBufferSize, getContext, getHeader, getSourceName, incStat, init, initStats, isSourceAlreadyInserted, setBufferSize, setContext, setHeader, setSourceAlreadyInserted, setSourceName
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface org.gorpipe.gor.model.GenomicIterator

        filter, getMonitor, moveToPosition, moveToPosition, pushdownCalc, pushdownCmd, pushdownFilter, pushdownGor, pushdownSelect, pushdownTop, pushdownWrite, seek, select
      • Methods inherited from interface org.gorpipe.gor.model.RowSourceStats

        getAvgSeekTimeMilliSecond
      • Methods inherited from interface java.util.Spliterator

        getExactSizeIfKnown, hasCharacteristics
    • Constructor Detail

      • BatchedPipeStepIteratorAdaptor

        public BatchedPipeStepIteratorAdaptor​(java.util.Iterator<? extends org.gorpipe.gor.model.Row> sourceIterator,
                                              gorsat.Commands.Analysis pipeStep,
                                              java.lang.String theHeader,
                                              BatchedReadSourceConfig brsConfig)
      • BatchedPipeStepIteratorAdaptor

        public BatchedPipeStepIteratorAdaptor​(java.util.Iterator<? extends org.gorpipe.gor.model.Row> sourceIterator,
                                              gorsat.Commands.Analysis pipeStep,
                                              boolean autoclose,
                                              java.lang.String theHeader,
                                              BatchedReadSourceConfig brsConfig)
    • Method Detail

      • setEx

        public void setEx​(java.lang.Throwable throwable)
      • getEx

        public java.lang.Throwable getEx()
      • setCurrentChrom

        public void setCurrentChrom​(java.lang.String chrom)
      • getAvgRowsPerMilliSecond

        public double getAvgRowsPerMilliSecond()
        Specified by:
        getAvgRowsPerMilliSecond in interface org.gorpipe.gor.model.RowSourceStats
      • getAvgBasesPerMilliSecond

        public double getAvgBasesPerMilliSecond()
        Specified by:
        getAvgBasesPerMilliSecond in interface org.gorpipe.gor.model.RowSourceStats
      • getAvgBatchSize

        public double getAvgBatchSize()
        Specified by:
        getAvgBatchSize in interface org.gorpipe.gor.model.RowSourceStats
      • getCurrentBatchSize

        public int getCurrentBatchSize()
        Specified by:
        getCurrentBatchSize in interface org.gorpipe.gor.model.RowSourceStats
      • getCurrentBatchLoc

        public int getCurrentBatchLoc()
        Specified by:
        getCurrentBatchLoc in interface org.gorpipe.gor.model.RowSourceStats
      • getCurrentBatchRow

        public org.gorpipe.gor.model.Row getCurrentBatchRow​(int i)
        Specified by:
        getCurrentBatchRow in interface org.gorpipe.gor.model.RowSourceStats
      • updateTimeMeasurement

        public void updateTimeMeasurement​(long deltaTimeNs,
                                          RowBuffer current)
      • getStream

        public java.util.stream.Stream<org.gorpipe.gor.model.Row> getStream()
      • getStream

        public java.util.stream.Stream<org.gorpipe.gor.model.Row> getStream​(boolean parallel)
      • getComparator

        public java.util.Comparator<org.gorpipe.gor.model.Row> getComparator()
        Specified by:
        getComparator in interface java.util.Spliterator<org.gorpipe.gor.model.Row>
      • tryAdvance

        public boolean tryAdvance​(java.util.function.Consumer<? super org.gorpipe.gor.model.Row> action)
        Specified by:
        tryAdvance in interface java.util.Spliterator<org.gorpipe.gor.model.Row>
      • clone

        public BatchedPipeStepIteratorAdaptor clone()
                                             throws java.lang.CloneNotSupportedException
        Overrides:
        clone in class org.gorpipe.gor.model.GenomicIteratorBase
        Throws:
        java.lang.CloneNotSupportedException
      • trySplit

        public java.util.Spliterator<org.gorpipe.gor.model.Row> trySplit()
        Specified by:
        trySplit in interface java.util.Spliterator<org.gorpipe.gor.model.Row>
      • estimateSize

        public long estimateSize()
        Specified by:
        estimateSize in interface java.util.Spliterator<org.gorpipe.gor.model.Row>
      • characteristics

        public int characteristics()
        Specified by:
        characteristics in interface java.util.Spliterator<org.gorpipe.gor.model.Row>
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • hasNext

        public boolean hasNext()
        Specified by:
        hasNext in interface java.util.Iterator<org.gorpipe.gor.model.Row>
      • next

        public org.gorpipe.gor.model.Row next()
        Specified by:
        next in interface java.util.Iterator<org.gorpipe.gor.model.Row>
      • remove

        public void remove()
        Specified by:
        remove in interface java.util.Iterator<org.gorpipe.gor.model.Row>
      • forEachRemaining

        public void forEachRemaining​(java.util.function.Consumer<? super org.gorpipe.gor.model.Row> action)
        Specified by:
        forEachRemaining in interface java.util.Iterator<org.gorpipe.gor.model.Row>
        Specified by:
        forEachRemaining in interface java.util.Spliterator<org.gorpipe.gor.model.Row>
      • seek

        public boolean seek​(java.lang.String seekChr,
                            int seekPos)
        Specified by:
        seek in interface org.gorpipe.gor.model.GenomicIterator
      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface org.gorpipe.gor.model.GenomicIterator
      • isBuffered

        public boolean isBuffered()
        Specified by:
        isBuffered in interface org.gorpipe.gor.model.GenomicIterator