Interface DataStreamWriter


public interface DataStreamWriter
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Called by client when output stream is ready for user data.
    default void
    Is called when client is going to perform a retry.
  • Method Details

    • onOutput

      void onOutput(OutputStream out) throws IOException
      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. If ClientConfigProperties.APP_COMPRESSED_DATA is set for an operation, then will be raw IO stream without compression.
      Parameters:
      out - - output stream
      Throws:
      IOException - - when any IO exceptions happens.
    • onRetry

      default void onRetry() throws IOException
      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.