Package com.ocient.cli.extract
Class AsyncS3OutputStream
java.lang.Object
java.io.OutputStream
com.ocient.cli.extract.AsyncS3OutputStream
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAsyncS3OutputStream(software.amazon.awssdk.services.s3.S3AsyncClient s3Client, String bucket, String filePath, int uploadPartSize, com.ibm.asyncutil.locks.AsyncSemaphore uploadPartSemaphore, Optional<ExtractMetrics> metrics) -
Method Summary
Methods inherited from class java.io.OutputStream
nullOutputStream
-
Field Details
-
DEFAULT_BUFFER_SIZE
protected static final int DEFAULT_BUFFER_SIZE- See Also:
-
-
Constructor Details
-
AsyncS3OutputStream
public AsyncS3OutputStream(software.amazon.awssdk.services.s3.S3AsyncClient s3Client, String bucket, String filePath, int uploadPartSize, com.ibm.asyncutil.locks.AsyncSemaphore uploadPartSemaphore, Optional<ExtractMetrics> metrics) throws IOException - Parameters:
s3Client- The AmazonS3 client. Created by the callerbucket- S3 bucketfilePath- path within the bucket- Throws:
IOException
-
-
Method Details
-
onStreamClosed
Returns a future that completes when the underlyingOutputStreamhas been closed. Importantly, calling this method does not trigger the close process. Callers are expected to callclose(). -
write
- Overrides:
writein classOutputStream- Throws:
IOException
-
write
- Overrides:
writein classOutputStream- Throws:
IOException
-
write
- Specified by:
writein classOutputStream- Throws:
IOException
-
flush
public void flush()- Specified by:
flushin interfaceFlushable- Overrides:
flushin classOutputStream
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classOutputStream- Throws:
IOException
-