Package com.clickhouse.client.api.insert
Class InsertResponse
java.lang.Object
com.clickhouse.client.api.insert.InsertResponse
- All Implemented Interfaces:
AutoCloseable
-
Constructor Summary
ConstructorsConstructorDescriptionInsertResponse(OperationMetrics metrics) InsertResponse(OperationMetrics metrics, Map<String, String> responseHeaders) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Returns the metrics of this operation.Alias forOperationMetrics.getQueryId()longAlias forServerMetrics.NUM_BYTES_READlongAlias forServerMetrics.NUM_ROWS_READReturns all collected response headers as an unmodifiable map.longAlias forServerMetrics.RESULT_ROWSReturns the value ofX-ClickHouse-Server-Display-Nameresponse header.longAlias forServerMetrics.ELAPSED_TIMElongAlias forServerMetrics.NUM_BYTES_WRITTENlongAlias forServerMetrics.NUM_ROWS_WRITTEN
-
Constructor Details
-
InsertResponse
-
InsertResponse
-
-
Method Details
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-
getMetrics
Returns the metrics of this operation.- Returns:
- metrics of this operation
-
getReadRows
public long getReadRows()Alias forServerMetrics.NUM_ROWS_READ- Returns:
- number of rows read by server from the storage
-
getReadBytes
public long getReadBytes()Alias forServerMetrics.NUM_BYTES_READ- Returns:
- number of bytes read by server from the storage
-
getWrittenRows
public long getWrittenRows()Alias forServerMetrics.NUM_ROWS_WRITTEN- Returns:
- number of rows written by server to the storage
-
getWrittenBytes
public long getWrittenBytes()Alias forServerMetrics.NUM_BYTES_WRITTEN- Returns:
- number of bytes written by server to the storage
-
getServerTime
public long getServerTime()Alias forServerMetrics.ELAPSED_TIME- Returns:
- elapsed time in nanoseconds
-
getResultRows
public long getResultRows()Alias forServerMetrics.RESULT_ROWS- Returns:
- number of returned rows
-
getQueryId
Alias forOperationMetrics.getQueryId()- Returns:
- number of returned bytes
-
getServerDisplayName
Returns the value ofX-ClickHouse-Server-Display-Nameresponse header.- Returns:
- server display name or
nullif not present
-
getResponseHeaders
Returns all collected response headers as an unmodifiable map. Only whitelisted ClickHouse headers are included.- Returns:
- map of header name to header value
-