net.snowflake.client.jdbc

## Class SnowflakeResultChunk

- java.lang.Object
- - net.snowflake.client.jdbc.SnowflakeResultChunk

    public class SnowflakeResultChunk
    extends Object

Class for result chunk

Created by jhuang on 11/12/14.

### Nested Class Summary

Nested Classes
`static class` `SnowflakeResultChunk.DownloadState`

### Constructor Summary

Constructors
Constructor and Description
`SnowflakeResultChunk(String url, int rowCount, int colCount, int uncompressedSize, boolean efficientStorage)`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods
`void` `addRow(Object[] row)`
`long` `computeNeededChunkMemory()` Compute the memory necessary to store the data of this chunk
`void` `ensureRowsComplete()` Checks that all data has been added after parsing.
`static Object` `extractCell(com.fasterxml.jackson.databind.JsonNode resultData, int rowIdx, int colIdx)`
`void` `freeData()`
`Object` `getCell(int rowIdx, int colIdx)` Creates a String object for the given cell
`int` `getColCount()`
`Condition` `getDownloadCondition()`
`String` `getDownloadError()`
`SnowflakeResultChunk.DownloadState` `getDownloadState()`
`long` `getDownloadTime()`
`ReentrantLock` `getLock()`
`long` `getParseTime()`
`int` `getRowCount()`
`int` `getUncompressedSize()`
`String` `getUrl()`
`void` `setDownloadError(String downloadError)`
`void` `setDownloadState(SnowflakeResultChunk.DownloadState downloadState)`
`void` `setDownloadTime(long downloadTime)`
`void` `setParseTime(long parseTime)`
`void` `setResultData(com.fasterxml.jackson.databind.JsonNode resultData)` Deprecated.
`void` `tryReuse(net.snowflake.client.jdbc.SnowflakeResultChunk.ResultChunkDataCache cache)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### SnowflakeResultChunk

    public SnowflakeResultChunk(String url,
                                int rowCount,
                                int colCount,
                                int uncompressedSize,
                                boolean efficientStorage)

### Method Detail

#### tryReuse

    public void tryReuse(net.snowflake.client.jdbc.SnowflakeResultChunk.ResultChunkDataCache cache)

#### setResultData

    @Deprecated
    public void setResultData(com.fasterxml.jackson.databind.JsonNode resultData)

Deprecated.
Set the data when using the fasterxml json parser

Parameters:
  `resultData` - result data in JSON form

#### extractCell

    public static Object extractCell(com.fasterxml.jackson.databind.JsonNode resultData,
                                     int rowIdx,
                                     int colIdx)

#### getCell

    public final Object getCell(int rowIdx,
                                int colIdx)

Creates a String object for the given cell

Parameters:
  `rowIdx` - zero based row
  `colIdx` - zero based column
Returns:
  String

#### getUrl

    public final String getUrl()

#### getRowCount

    public final int getRowCount()

#### getUncompressedSize

    public final int getUncompressedSize()

#### addRow

    public final void addRow(Object[] row)
                      throws SnowflakeSQLException

Throws:
  `SnowflakeSQLException`

#### ensureRowsComplete

    public final void ensureRowsComplete()
                                  throws SnowflakeSQLException

Checks that all data has been added after parsing.

Throws:
  `SnowflakeSQLException` - when rows are not all downloaded

#### computeNeededChunkMemory

    public final long computeNeededChunkMemory()

Compute the memory necessary to store the data of this chunk

Returns:
  necessary memory in bytes

#### freeData

    public final void freeData()

#### getColCount

    public final int getColCount()

#### getDownloadTime

    public long getDownloadTime()

#### setDownloadTime

    public void setDownloadTime(long downloadTime)

#### getParseTime

    public long getParseTime()

#### setParseTime

    public void setParseTime(long parseTime)

#### getLock

    public ReentrantLock getLock()

#### getDownloadCondition

    public Condition getDownloadCondition()

#### getDownloadError

    public String getDownloadError()

#### setDownloadError

    public void setDownloadError(String downloadError)

#### getDownloadState

    public SnowflakeResultChunk.DownloadState getDownloadState()

#### setDownloadState

    public void setDownloadState(SnowflakeResultChunk.DownloadState downloadState)