Package com.clickhouse.client
Class ClickHouseStreamResponse
java.lang.Object
com.clickhouse.client.ClickHouseStreamResponse
- All Implemented Interfaces:
ClickHouseResponse,Serializable,AutoCloseable
Deprecated.
A stream response from server.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final ClickHouseConfigDeprecated.protected static final List<ClickHouseColumn>Deprecated.protected final ClickHouseDataProcessorDeprecated.protected final ClickHouseResponseSummaryDeprecated.Fields inherited from interface com.clickhouse.client.ClickHouseResponse
EMPTY -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedClickHouseStreamResponse(ClickHouseConfig config, ClickHouseInputStream input, Map<String, Serializable> settings, List<ClickHouseColumn> columns, ClickHouseResponseSummary summary, TimeZone timeZone) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Deprecated.Deprecated.Gets list of columns.Deprecated.Deprecated.Gets input stream of the response.Deprecated.Gets summary of this response.Deprecated.Returns a server timezone if it is returned by server in a headerX-ClickHouse-Timezoneor other way.booleanisClosed()Deprecated.Checks whether the response has been closed or not.static ClickHouseResponseof(ClickHouseConfig config, ClickHouseInputStream input, Map<String, Serializable> settings, List<ClickHouseColumn> columns, ClickHouseResponseSummary summary, TimeZone timeZone) Deprecated.records()Deprecated.Returns an iterable collection of records which can be walked through in a foreach loop.<T> Iterable<T>Deprecated.Returns an iterable collection of mapped objects which can be walked through in a foreach loop.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.clickhouse.client.ClickHouseResponse
firstRecord, firstRecord, pipe, stream, stream
-
Field Details
-
defaultTypes
Deprecated. -
config
Deprecated. -
processor
Deprecated. -
summary
Deprecated.
-
-
Constructor Details
-
ClickHouseStreamResponse
protected ClickHouseStreamResponse(ClickHouseConfig config, ClickHouseInputStream input, Map<String, Serializable> settings, List<ClickHouseColumn> columns, ClickHouseResponseSummary summary, TimeZone timeZone) throws IOExceptionDeprecated.- Throws:
IOException
-
-
Method Details
-
of
public static ClickHouseResponse of(ClickHouseConfig config, ClickHouseInputStream input, Map<String, Serializable> settings, List<ClickHouseColumn> columns, ClickHouseResponseSummary summary, TimeZone timeZone) throws IOExceptionDeprecated.- Throws:
IOException
-
isClosed
public boolean isClosed()Deprecated.Description copied from interface:ClickHouseResponseChecks whether the response has been closed or not.- Specified by:
isClosedin interfaceClickHouseResponse- Returns:
- true if the response has been closed; false otherwise
-
close
public void close()Deprecated.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceClickHouseResponse
-
getColumns
Deprecated.Description copied from interface:ClickHouseResponseGets list of columns.- Specified by:
getColumnsin interfaceClickHouseResponse- Returns:
- non-null list of column
-
getFormat
Deprecated. -
getSummary
Deprecated.Description copied from interface:ClickHouseResponseGets summary of this response. Keep in mind that the summary may change over time until response is closed.- Specified by:
getSummaryin interfaceClickHouseResponse- Returns:
- non-null summary of this response
-
getInputStream
Deprecated.Description copied from interface:ClickHouseResponseGets input stream of the response. In general, this is the most memory-efficient way for streaming data from server to client. However, this also means additional work is required for deserialization, especially when using a binary format.- Specified by:
getInputStreamin interfaceClickHouseResponse- Returns:
- non-null input stream for getting raw data returned from server
-
records
Deprecated.Description copied from interface:ClickHouseResponseReturns an iterable collection of records which can be walked through in a foreach loop. Please pay attention that: 1)UncheckedIOExceptionmight be thrown when iterating through the collection; and 2) it's not supposed to be called for more than once.- Specified by:
recordsin interfaceClickHouseResponse- Returns:
- non-null iterable collection
-
getTimeZone
Deprecated.Description copied from interface:ClickHouseResponseReturns a server timezone if it is returned by server in a headerX-ClickHouse-Timezoneor other way. If not, it returns null- Specified by:
getTimeZonein interfaceClickHouseResponse- Returns:
- server timezone from server response or null
-
records
Deprecated.Description copied from interface:ClickHouseResponseReturns an iterable collection of mapped objects which can be walked through in a foreach loop. WhenobjClassis null orClickHouseRecord, it's same as callingClickHouseResponse.records().- Specified by:
recordsin interfaceClickHouseResponse- Type Parameters:
T- type of the mapped object- Parameters:
objClass- non-null class of the mapped object- Returns:
- non-null iterable collection
-