Class S3ClientOptions


  • public class S3ClientOptions
    extends Object
    • Constructor Detail

      • S3ClientOptions

        public S3ClientOptions()
    • Method Detail

      • getRegion

        public String getRegion()
      • getPartSize

        public long getPartSize()
      • withThroughputTargetGbps

        public S3ClientOptions withThroughputTargetGbps​(double throughputTargetGbps)
      • getThroughputTargetGbps

        public double getThroughputTargetGbps()
      • withReadBackpressureEnabled

        public S3ClientOptions withReadBackpressureEnabled​(boolean enable)
        Set whether backpressure is enabled (false by default), to prevent response data downloading faster than you can handle it.

        If false, no backpressure is applied and data will download as fast as possible.

        If true, each S3MetaRequest has a flow-control window that shrinks as response body data is downloaded (headers do not affect the window). withInitialReadWindowSize(long) determines the starting size of each S3MetaRequest's window, in bytes. Data stops downloading data whenever the window reaches zero. Increment the window to keep data flowing by calling S3MetaRequest.incrementReadWindow(long), or by returning a size from S3MetaRequestResponseHandler.onResponseBody(java.nio.ByteBuffer, long, long). Maintain a larger window to keep up a high download throughput, parts cannot download in parallel unless the window is large enough to hold multiple parts. Maintain a smaller window to limit the amount of data buffered in memory.

        WARNING: This feature is experimental. Currently, backpressure is only applied to GetObject requests which are split into multiple parts, and you may still receive some data after the window reaches zero.

        Parameters:
        enable - whether to enable or disable backpressure
        Returns:
        this
      • getReadBackpressureEnabled

        public boolean getReadBackpressureEnabled()
      • withInitialReadWindowSize

        public S3ClientOptions withInitialReadWindowSize​(long bytes)
        The starting size of each S3MetaRequest's flow-control window (if backpressure is enabled).
        Parameters:
        bytes - size in bytes
        Returns:
        this
        See Also:
        withReadBackpressureEnabled(boolean)
      • getInitialReadWindowSize

        public long getInitialReadWindowSize()
      • getEndpoint

        public String getEndpoint()
      • getTlsContext

        public TlsContext getTlsContext()
      • withMaxConnections

        public S3ClientOptions withMaxConnections​(int maxConnections)
      • getMaxConnections

        public int getMaxConnections()
      • getComputeContentMd5

        public Boolean getComputeContentMd5()