public class GoogleCloudStorageWriteChannel extends AbstractGoogleAsyncWriteChannel<com.google.api.services.storage.Storage.Objects.Insert,com.google.api.services.storage.model.StorageObject> implements GoogleCloudStorageItemInfo.Provider
GCS_UPLOAD_GRANULARITY, UPLOAD_CHUNK_SIZE_DEFAULT, UPLOAD_PIPE_BUFFER_SIZE_DEFAULT| Constructor and Description |
|---|
GoogleCloudStorageWriteChannel(java.util.concurrent.ExecutorService uploadThreadPool,
com.google.api.services.storage.Storage gcs,
ClientRequestHelper<com.google.api.services.storage.model.StorageObject> requestHelper,
java.lang.String bucketName,
java.lang.String objectName,
AsyncWriteChannelOptions options,
ObjectWriteConditions writeConditions,
java.util.Map<java.lang.String,java.lang.String> objectMetadata)
Deprecated.
|
GoogleCloudStorageWriteChannel(java.util.concurrent.ExecutorService uploadThreadPool,
com.google.api.services.storage.Storage gcs,
ClientRequestHelper<com.google.api.services.storage.model.StorageObject> requestHelper,
java.lang.String bucketName,
java.lang.String objectName,
AsyncWriteChannelOptions options,
ObjectWriteConditions writeConditions,
java.util.Map<java.lang.String,java.lang.String> objectMetadata,
java.lang.String contentType)
Deprecated.
|
GoogleCloudStorageWriteChannel(java.util.concurrent.ExecutorService uploadThreadPool,
com.google.api.services.storage.Storage gcs,
ClientRequestHelper<com.google.api.services.storage.model.StorageObject> requestHelper,
java.lang.String bucketName,
java.lang.String objectName,
java.lang.String contentType,
java.lang.String kmsKeyName,
AsyncWriteChannelOptions options,
ObjectWriteConditions writeConditions,
java.util.Map<java.lang.String,java.lang.String> objectMetadata)
Constructs an instance of GoogleCloudStorageWriteChannel.
|
| Modifier and Type | Method and Description |
|---|---|
com.google.api.services.storage.Storage.Objects.Insert |
createRequest(com.google.api.client.http.InputStreamContent inputStream) |
GoogleCloudStorageItemInfo |
getItemInfo()
Returns non-null only if close() has been called and the underlying object has been
successfully committed.
|
void |
handleResponse(com.google.api.services.storage.model.StorageObject response) |
close, createResponseFromException, enableFileSizeLimit250Gb, initialize, isDirectUploadEnabled, isOpen, setClientRequestHelper, setContentType, setDirectUploadEnabled, setUploadBufferSize, setUploadChunkSize, write@Deprecated
public GoogleCloudStorageWriteChannel(java.util.concurrent.ExecutorService uploadThreadPool,
com.google.api.services.storage.Storage gcs,
ClientRequestHelper<com.google.api.services.storage.model.StorageObject> requestHelper,
java.lang.String bucketName,
java.lang.String objectName,
AsyncWriteChannelOptions options,
ObjectWriteConditions writeConditions,
java.util.Map<java.lang.String,java.lang.String> objectMetadata)
uploadThreadPool - thread pool to use for running the upload operationgcs - storage object instancerequestHelper - a ClientRequestHelper to set extra headersbucketName - name of the bucket to create object inobjectName - name of the object to createwriteConditions - conditions on which write should be allowed to continueobjectMetadata - metadata to apply to the newly created object@Deprecated
public GoogleCloudStorageWriteChannel(java.util.concurrent.ExecutorService uploadThreadPool,
com.google.api.services.storage.Storage gcs,
ClientRequestHelper<com.google.api.services.storage.model.StorageObject> requestHelper,
java.lang.String bucketName,
java.lang.String objectName,
AsyncWriteChannelOptions options,
ObjectWriteConditions writeConditions,
java.util.Map<java.lang.String,java.lang.String> objectMetadata,
java.lang.String contentType)
uploadThreadPool - thread pool to use for running the upload operationgcs - storage object instancerequestHelper - a ClientRequestHelper to set extra headersbucketName - name of the bucket to create object inobjectName - name of the object to createwriteConditions - conditions on which write should be allowed to continueobjectMetadata - metadata to apply to the newly created objectcontentType - content typepublic GoogleCloudStorageWriteChannel(java.util.concurrent.ExecutorService uploadThreadPool,
com.google.api.services.storage.Storage gcs,
ClientRequestHelper<com.google.api.services.storage.model.StorageObject> requestHelper,
java.lang.String bucketName,
java.lang.String objectName,
java.lang.String contentType,
java.lang.String kmsKeyName,
AsyncWriteChannelOptions options,
ObjectWriteConditions writeConditions,
java.util.Map<java.lang.String,java.lang.String> objectMetadata)
uploadThreadPool - thread pool to use for running the upload operationgcs - storage object instancerequestHelper - a ClientRequestHelper to set extra headersbucketName - name of the bucket to create object inobjectName - name of the object to createcontentType - content typekmsKeyName - Name of Cloud KMS key to use to encrypt the newly created objectwriteConditions - conditions on which write should be allowed to continueobjectMetadata - metadata to apply to the newly created objectpublic com.google.api.services.storage.Storage.Objects.Insert createRequest(com.google.api.client.http.InputStreamContent inputStream)
throws java.io.IOException
createRequest in class AbstractGoogleAsyncWriteChannel<com.google.api.services.storage.Storage.Objects.Insert,com.google.api.services.storage.model.StorageObject>java.io.IOExceptionpublic void handleResponse(com.google.api.services.storage.model.StorageObject response)
handleResponse in class AbstractGoogleAsyncWriteChannel<com.google.api.services.storage.Storage.Objects.Insert,com.google.api.services.storage.model.StorageObject>public GoogleCloudStorageItemInfo getItemInfo()
getItemInfo in interface GoogleCloudStorageItemInfo.ProviderCopyright © 2019. All rights reserved.