Class TupleBatch


  • public class TupleBatch
    extends Object
    Represents a set of indexed tuples. The beginning row is the first row contained in this batch; if it equals "1" then it is the first row of the tuple source, otherwise this is a batch of intermediate tuples. The ending row is the last row contained in this tuple batch; it is equal to the beginning row plus the number of rows contained in this batch, minus one.
    • Constructor Detail

      • TupleBatch

        public TupleBatch()
        Required to honor Externalizable contract
      • TupleBatch

        public TupleBatch​(long beginRow,
                          List<?>[] tuples)
        Constructor
        Parameters:
        beginRow - indicates the row of the tuple source which is the first row contained in this batch
        tuples - array of List objects, each of which is a single tuple
      • TupleBatch

        public TupleBatch​(long beginRow,
                          List<? extends List<?>> listOfTupleLists)
        Constructor
        Parameters:
        beginRow - indicates the row of the tuple source which is the first row contained in this batch
        listOfTupleLists - List containing List objects, each of which is a single tuple
    • Method Detail

      • getBeginRow

        public long getBeginRow()
        Return the number of the first row of the tuple source that is contained in this batch (one-based).
        Returns:
        the first row contained in this tuple batch
      • getEndRow

        public long getEndRow()
        Return number of the last row of the tuple source that is contained in this batch (one-based).
        Returns:
        the last row contained in this tuple batch
      • getRowCount

        public int getRowCount()
        Return the number of rows contained in this tuple batch
        Returns:
        the number of rows contained in this tuple batch
      • getTuple

        public List<?> getTuple​(long rowIndex)
        Return the tuple at the given index (one-based).
        Returns:
        the tuple at the given index
      • getTuples

        public List<List<?>> getTuples()
      • getAllTuples

        public List<?>[] getAllTuples()
        Get all tuples
        Returns:
        All tuples
      • getTerminationFlag

        public boolean getTerminationFlag()
        Check whether this batch is the last in a series of batches.
        Returns:
        True if this batch is last
      • setTerminationFlag

        public void setTerminationFlag​(boolean terminationFlag)
        Set whether this batch is the last in a series of batches.
        Parameters:
        terminationFlag - True if last
      • setTermination

        public void setTermination​(byte val)
      • getTermination

        public byte getTermination()
      • containsRow

        public boolean containsRow​(long row)
      • toString

        public String toString()
        Return a String describing this object
        Overrides:
        toString in class Object
      • setRowOffset

        public void setRowOffset​(long rowOffset)