Interface BlobWriteSession
A session can only write a single version of an object. If writing multiple versions of an object a new session must be created each time.
Provides an api that allows writing to and retrieving the resulting BlobInfo
after
write finalization.
The underlying implementation is dictated based upon the specified BlobWriteSessionConfig
provided at StorageOptions
creation time.
- Since:
- 2.26.0 This new api is in preview and is subject to breaking changes.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptioncom.google.api.core.ApiFuture<BlobInfo>
Return anApiFuture
<BlobInfo>
which will represent the state of the object upon finalization and success response from Google Cloud Storage.open()
Open theWritableByteChannel
for this session.
-
Method Details
-
open
Open theWritableByteChannel
for this session.A session may only be
open
ed once. If multiple calls to open are made, an illegal state exception will be thrownUpon calling
Channel.close()
the object creation will be finalized, andgetResult()
s future should resolve.- Throws:
IOException
- When creating theWritableByteChannel
if an unrecoverable underlying IOException occurs it can be rethrownIllegalStateException
- if open is called more than once- Since:
- 2.26.0 This new api is in preview and is subject to breaking changes.
-
getResult
Return anApiFuture
<BlobInfo>
which will represent the state of the object upon finalization and success response from Google Cloud Storage.This future will not resolve until: 1. The object is successfully finalized and created in Google Cloud Storage 2. A terminal failure occurs, the terminal failure will become the exception result
- Since:
- 2.26.0 This new api is in preview and is subject to breaking changes.
-