Class StreamingResult

  • All Implemented Interfaces:
    java.lang.AutoCloseable, java.sql.ResultSet, java.sql.Wrapper, Completion, ServerMessage

    public class StreamingResult
    extends Result
    • Field Detail

      • lock

        private final java.util.concurrent.locks.ReentrantLock lock
      • dataFetchTime

        private int dataFetchTime
      • fetchSize

        private int fetchSize
    • Constructor Detail

      • StreamingResult

        public StreamingResult​(Statement stmt,
                               boolean binaryProtocol,
                               long maxRows,
                               ColumnDefinitionPacket[] metadataList,
                               PacketReader reader,
                               Context context,
                               int fetchSize,
                               java.util.concurrent.locks.ReentrantLock lock,
                               int resultSetType,
                               boolean closeOnCompletion,
                               boolean traceEnable)
                        throws java.sql.SQLException
        Throws:
        java.sql.SQLException
    • Method Detail

      • streaming

        public boolean streaming()
        Specified by:
        streaming in class Result
      • nextStreamingValue

        private void nextStreamingValue()
                                 throws java.sql.SQLException
        This permit to replace current stream results by next ones.
        Throws:
        java.sql.SQLException - if server return an unexpected error
      • addStreamingValue

        private void addStreamingValue()
                                throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • fetchRemaining

        public void fetchRemaining()
                            throws java.sql.SQLException
        When protocol has a current Streaming result (this) fetch all to permit another query is executing.
        Specified by:
        fetchRemaining in class Result
        Throws:
        java.sql.SQLException - if any error occur
      • next

        public boolean next()
                     throws java.sql.SQLException
        Specified by:
        next in interface java.sql.ResultSet
        Specified by:
        next in class Result
        Throws:
        java.sql.SQLException
      • isAfterLast

        public boolean isAfterLast()
                            throws java.sql.SQLException
        Specified by:
        isAfterLast in interface java.sql.ResultSet
        Specified by:
        isAfterLast in class Result
        Throws:
        java.sql.SQLException
      • isFirst

        public boolean isFirst()
                        throws java.sql.SQLException
        Specified by:
        isFirst in interface java.sql.ResultSet
        Specified by:
        isFirst in class Result
        Throws:
        java.sql.SQLException
      • isLast

        public boolean isLast()
                       throws java.sql.SQLException
        Specified by:
        isLast in interface java.sql.ResultSet
        Specified by:
        isLast in class Result
        Throws:
        java.sql.SQLException
      • beforeFirst

        public void beforeFirst()
                         throws java.sql.SQLException
        Specified by:
        beforeFirst in interface java.sql.ResultSet
        Specified by:
        beforeFirst in class Result
        Throws:
        java.sql.SQLException
      • afterLast

        public void afterLast()
                       throws java.sql.SQLException
        Specified by:
        afterLast in interface java.sql.ResultSet
        Specified by:
        afterLast in class Result
        Throws:
        java.sql.SQLException
      • first

        public boolean first()
                      throws java.sql.SQLException
        Specified by:
        first in interface java.sql.ResultSet
        Specified by:
        first in class Result
        Throws:
        java.sql.SQLException
      • last

        public boolean last()
                     throws java.sql.SQLException
        Specified by:
        last in interface java.sql.ResultSet
        Specified by:
        last in class Result
        Throws:
        java.sql.SQLException
      • getRow

        public int getRow()
                   throws java.sql.SQLException
        Specified by:
        getRow in interface java.sql.ResultSet
        Specified by:
        getRow in class Result
        Throws:
        java.sql.SQLException
      • absolute

        public boolean absolute​(int idx)
                         throws java.sql.SQLException
        Specified by:
        absolute in interface java.sql.ResultSet
        Specified by:
        absolute in class Result
        Throws:
        java.sql.SQLException
      • relative

        public boolean relative​(int rows)
                         throws java.sql.SQLException
        Specified by:
        relative in interface java.sql.ResultSet
        Specified by:
        relative in class Result
        Throws:
        java.sql.SQLException
      • previous

        public boolean previous()
                         throws java.sql.SQLException
        Specified by:
        previous in interface java.sql.ResultSet
        Specified by:
        previous in class Result
        Throws:
        java.sql.SQLException
      • getFetchSize

        public int getFetchSize()
      • setFetchSize

        public void setFetchSize​(int fetchSize)
                          throws java.sql.SQLException
        Throws:
        java.sql.SQLException