Class FileIoOptions

java.lang.Object
software.amazon.awssdk.crt.s3.FileIoOptions

public class FileIoOptions extends Object
WARNING: experimental/unstable, the default behavior is subjected to change in the future. Controls how client performs file I/O operations. Only applies to file-based workloads.
  • Constructor Summary

    Constructors
    Constructor
    Description
    FileIoOptions(boolean shouldStream, double diskThroughputGbps, boolean directIo)
    Constructor with all parameters.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Gets whether direct I/O is enabled to bypass the OS cache.
    double
    Gets the estimated disk throughput in gigabits per second (Gbps).
    boolean
    Gets whether to skip buffering the part in memory before sending the request.
    void
    setDirectIo(boolean directIo)
    Sets whether to enable direct I/O to bypass the OS cache.
    void
    setDiskThroughputGbps(double diskThroughputGbps)
    Sets the estimated disk throughput in gigabits per second (Gbps).
    void
    setShouldStream(boolean shouldStream)
    Sets whether to skip buffering the part in memory before sending the request.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • FileIoOptions

      public FileIoOptions(boolean shouldStream, double diskThroughputGbps, boolean directIo)
      Constructor with all parameters.
      Parameters:
      shouldStream - Whether to skip buffering the part in memory before sending the request
      diskThroughputGbps - The estimated disk throughput in gigabits per second (Gbps)
      directIo - Whether to enable direct I/O to bypass the OS cache
  • Method Details

    • getShouldStream

      public boolean getShouldStream()
      Gets whether to skip buffering the part in memory before sending the request.
      Returns:
      true if streaming is enabled, false otherwise
    • setShouldStream

      public void setShouldStream(boolean shouldStream)
      Sets whether to skip buffering the part in memory before sending the request. If set to true, set the diskThroughputGbps to reasonably align with the available disk throughput. Otherwise, the transfer may fail with connection starvation.
      Parameters:
      shouldStream - true to enable streaming, false otherwise
    • getDiskThroughputGbps

      public double getDiskThroughputGbps()
      Gets the estimated disk throughput in gigabits per second (Gbps).
      Returns:
      the estimated disk throughput in Gbps
    • setDiskThroughputGbps

      public void setDiskThroughputGbps(double diskThroughputGbps)
      Sets the estimated disk throughput in gigabits per second (Gbps). Only applied when shouldStream is true.
      Parameters:
      diskThroughputGbps - the estimated disk throughput in Gbps
    • getDirectIo

      public boolean getDirectIo()
      Gets whether direct I/O is enabled to bypass the OS cache.
      Returns:
      true if direct I/O is enabled, false otherwise
    • setDirectIo

      public void setDirectIo(boolean directIo)
      Sets whether to enable direct I/O to bypass the OS cache. Helpful when the disk I/O outperforms the kernel cache. Notes: - Only supported on Linux for now. - Only supports upload for now.
      Parameters:
      directIo - true to enable direct I/O, false otherwise