Interface BlobAppendableUpload (2.52.2)

public interface BlobAppendableUpload extends BlobWriteSession

Interface representing those methods which can be used to write to and interact with an appendable upload. See Also: Storage#blobAppendableUpload(BlobInfo, BlobAppendableUploadConfig, BlobWriteOption...)

Implements

BlobWriteSession

Methods

getResult()

public abstract ApiFuture<BlobInfo> getResult()

Return an ApiFuture<BlobInfo> which will represent the state of the object in Google Cloud Storage.

This future will not resolve until:

  1. The object is successfully finalized in Google Cloud Storage by calling AppendableUploadWriteableByteChannel#finalizeAndClose()
  2. This session is detached from the upload without finalizing by calling AppendableUploadWriteableByteChannel#closeWithoutFinalizing()
  3. The session is closed by calling AppendableUploadWriteableByteChannel#close()
  4. A terminal failure occurs, the terminal failure will become the exception result

NOTICE: Some fields may not be populated unless finalization has completed.

If a terminal failure is encountered, calling either ApiFuture#get() or ApiFuture#get(long, TimeUnit) will result in an java.util.concurrent.ExecutionException with the cause.

Returns
Type Description
ApiFuture<BlobInfo>

open()

public abstract BlobAppendableUpload.AppendableUploadWriteableByteChannel open()

Open the AppendableUploadWriteableByteChannel for this session.

A session may only be opened once. If multiple calls to open are made, an illegal state exception will be thrown

The returned AppendableUploadWriteableByteChannel can throw IOExceptions from any of its usual methods. Any IOException thrown can have a cause of a StorageException. However, not all IOExceptions will have StorageExceptions.

Returns
Type Description
BlobAppendableUpload.AppendableUploadWriteableByteChannel
Exceptions
Type Description
IOException

When creating the AppendableUploadWriteableByteChannel if an unrecoverable underlying IOException occurs it can be rethrown