Interface ProtocolEntityReader<T extends ProtocolEntity,​M extends Message>

All Known Implementing Classes:
BinaryResultsetReader, ColumnDefinitionReader, ResultsetRowReader, TextResultsetReader

public interface ProtocolEntityReader<T extends ProtocolEntity,​M extends Message>
  • Method Summary

    Modifier and Type Method Description
    default T read​(int maxRows, boolean streamResults, M resultPacket, ColumnDefinition metadata, ProtocolEntityFactory<T,​M> protocolEntityFactory)
    Reads one result set off of the wire, if the result is actually an update count, creates an update-count only result set.
    default T read​(ProtocolEntityFactory<T,​M> sf)  
  • Method Details

    • read

      default T read​(ProtocolEntityFactory<T,​M> sf) throws java.io.IOException
      Parameters:
      sf - ProtocolEntityFactory instance
      Returns:
      ProtocolEntity instance
      Throws:
      java.io.IOException - if an error occurs
    • read

      default T read​(int maxRows, boolean streamResults, M resultPacket, ColumnDefinition metadata, ProtocolEntityFactory<T,​M> protocolEntityFactory) throws java.io.IOException
      Reads one result set off of the wire, if the result is actually an update count, creates an update-count only result set.
      Parameters:
      maxRows - the maximum number of rows to read (-1 means all rows)
      streamResults - should the driver leave the results on the wire, and read them only when needed?
      resultPacket - the first packet of information in the result set
      metadata - use this metadata instead of the one provided on wire
      protocolEntityFactory - ProtocolEntityFactory instance
      Returns:
      a result set that either represents the rows, or an update count
      Throws:
      java.io.IOException - if an error occurs while reading the rows