Class S3MetaRequest

    • Constructor Detail

      • S3MetaRequest

        public S3MetaRequest()
    • Method Detail

      • canReleaseReferencesImmediately

        protected boolean canReleaseReferencesImmediately()
        Determines whether a resource releases its dependencies at the same time the native handle is released or if it waits. Resources that wait are responsible for calling releaseReferences() manually.
        Specified by:
        canReleaseReferencesImmediately in class CrtResource
        Returns:
        true if this resource releases synchronously, false if this resource performs async shutdown
      • releaseNativeHandle

        protected void releaseNativeHandle()
        Cleans up the native resources associated with this client. The client is unusable after this call
        Specified by:
        releaseNativeHandle in class CrtResource
      • cancel

        public void cancel()
      • pause

        public ResumeToken pause()
        Pauses meta request and returns a token that can be used to resume a meta request. For PutObject resume, input stream should always start at the beginning, already uploaded parts will be skipped, but checksums on those will be verified if request specified checksum algo.
        Returns:
        token to resume request. might be null if request has not started executing yet
      • incrementReadWindow

        public void incrementReadWindow​(long bytes)
        Increment the flow-control window, so that response data continues downloading.

        If the client was created with S3ClientOptions.withReadBackpressureEnabled(boolean) set true, each S3MetaRequest has a flow-control window that shrinks as response body data is downloaded (headers do not affect the size of the window). S3ClientOptions.withInitialReadWindowSize(long) sets the starting size for each S3MetaRequest's window. Whenever the window reaches zero, data stops downloading. Increment the window to keep data flowing. 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.

        If backpressure is disabled this call has no effect, data is downloaded as fast as possible.

        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:
        bytes - size to increment window by
        See Also:
        S3ClientOptions.withReadBackpressureEnabled(boolean)