java.lang.AutoCloseable, java.io.Closeable, IOStatisticsSourceAbstractMultipartUploader, FileSystemMultipartUploader@Public @Unstable public interface MultipartUploader extends java.io.Closeable, IOStatisticsSource
The interface extends IOStatisticsSource so that there is no
need to cast an instance to see if is a source of statistics.
However, implementations MAY return null for their actual statistics.
| Modifier and Type | Method | Description |
|---|---|---|
java.util.concurrent.CompletableFuture<java.lang.Void> |
abort(UploadHandle uploadId,
Path filePath) |
Aborts a multipart upload.
|
java.util.concurrent.CompletableFuture<java.lang.Integer> |
abortUploadsUnderPath(Path path) |
Best effort attempt to aborts multipart uploads under a path.
|
java.util.concurrent.CompletableFuture<PathHandle> |
complete(UploadHandle uploadId,
Path filePath,
java.util.Map<java.lang.Integer,PartHandle> handles) |
Complete a multipart upload.
|
java.util.concurrent.CompletableFuture<PartHandle> |
putPart(UploadHandle uploadId,
int partNumber,
Path filePath,
java.io.InputStream inputStream,
long lengthInBytes) |
Put part as part of a multipart upload.
|
java.util.concurrent.CompletableFuture<UploadHandle> |
startUpload(Path filePath) |
Initialize a multipart upload.
|
getIOStatisticsjava.util.concurrent.CompletableFuture<UploadHandle> startUpload(Path filePath) throws java.io.IOException
filePath - Target path for upload.java.io.IOException - IO failurejava.util.concurrent.CompletableFuture<PartHandle> putPart(UploadHandle uploadId, int partNumber, Path filePath, java.io.InputStream inputStream, long lengthInBytes) throws java.io.IOException
uploadId - Identifier from startUpload(Path).partNumber - Index of the part relative to others.filePath - Target path for upload (as startUpload(Path)).inputStream - Data for this part. Implementations MUST close this
stream after reading in the data.lengthInBytes - Target length to read from the stream.java.io.IOException - IO failurejava.util.concurrent.CompletableFuture<PathHandle> complete(UploadHandle uploadId, Path filePath, java.util.Map<java.lang.Integer,PartHandle> handles) throws java.io.IOException
uploadId - Identifier from startUpload(Path).filePath - Target path for upload (as startUpload(Path).handles - non-empty map of part number to part handle.
from putPart(UploadHandle, int, Path, InputStream, long).java.io.IOException - IO failurejava.util.concurrent.CompletableFuture<java.lang.Void> abort(UploadHandle uploadId, Path filePath) throws java.io.IOException
uploadId - Identifier from startUpload(Path).filePath - Target path for upload (same as startUpload(Path).java.io.IOException - IO failurejava.util.concurrent.CompletableFuture<java.lang.Integer> abortUploadsUnderPath(Path path) throws java.io.IOException
path - path to abort uploads under.java.io.IOException - IO failureCopyright © 2008–2025 Apache Software Foundation. All rights reserved.