Package com.clickhouse.client.api
Interface DataStreamWriter
public interface DataStreamWriter
-
Method Summary
Modifier and TypeMethodDescriptionvoidonOutput(OutputStream out) Called by client when output stream is ready for user data.default voidonRetry()Is called when client is going to perform a retry.
-
Method Details
-
onOutput
Called by client when output stream is ready for user data. This method is called once per operation, so all data should be written while the call. Output stream will be closed by client. When client compression is enabled, then output stream will be a compressing one. IfClientConfigProperties.APP_COMPRESSED_DATAis set for an operation, then will be raw IO stream without compression.- Parameters:
out- - output stream- Throws:
IOException- - when any IO exceptions happens.
-
onRetry
Is called when client is going to perform a retry. It is optional to implement this method because most cases there is nothing to reset. Useful to reset wrapped stream or throw exception to indicate that retry is not supported for a data source.- Throws:
IOException- - when any IO exception happens.
-