Package software.amazon.awssdk.crt.s3
Class FileIoOptions
- java.lang.Object
-
- software.amazon.awssdk.crt.s3.FileIoOptions
-
public class FileIoOptions extends Object
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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
getDirectIo()
Gets whether direct I/O is enabled to bypass the OS cache.double
getDiskThroughputGbps()
Gets the estimated disk throughput in gigabits per second (Gbps).boolean
getShouldStream()
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.
-
-
-
Constructor Detail
-
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 requestdiskThroughputGbps
- The estimated disk throughput in gigabits per second (Gbps)directIo
- Whether to enable direct I/O to bypass the OS cache
-
-
Method Detail
-
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 thediskThroughputGbps
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 whenshouldStream
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
-
-