public abstract class AbstractGoogleAsyncWriteChannel<T extends com.google.api.client.googleapis.services.AbstractGoogleClientRequest<S>,S> extends BaseAbstractGoogleAsyncWriteChannel<S>
contentType, GCS_UPLOAD_GRANULARITY, logger, threadPool, UPLOAD_CHUNK_SIZE_DEFAULT, UPLOAD_PIPE_BUFFER_SIZE_DEFAULT, uploadChunkSize, uploadOperation
Constructor and Description |
---|
AbstractGoogleAsyncWriteChannel(ExecutorService threadPool,
AsyncWriteChannelOptions options)
Construct a new channel using the given ExecutorService to run background uploads.
|
Modifier and Type | Method and Description |
---|---|
abstract T |
createRequest(com.google.api.client.http.InputStreamContent inputStream)
Create an API request to upload the given InputStreamContent.
|
void |
setClientRequestHelper(ClientRequestHelper<S> helper)
Sets the ClientRequestHelper to be used instead of calling final methods in client requests.
|
void |
setUploadChunkSize(int chunkSize)
Sets size of upload buffer used.
|
void |
startUpload(PipedInputStream pipeSource)
Create a new thread which handles the upload.
|
close, createResponseFromException, getResourceString, handleResponse, initialize, isDirectUploadEnabled, isOpen, setContentType, setDirectUploadEnabled, setUploadBufferSize, write
public AbstractGoogleAsyncWriteChannel(ExecutorService threadPool, AsyncWriteChannelOptions options)
public void setClientRequestHelper(ClientRequestHelper<S> helper)
public abstract T createRequest(com.google.api.client.http.InputStreamContent inputStream) throws IOException
IOException
public void setUploadChunkSize(int chunkSize)
setUploadChunkSize
in class BaseAbstractGoogleAsyncWriteChannel<S>
public void startUpload(PipedInputStream pipeSource) throws IOException
BaseAbstractGoogleAsyncWriteChannel
startUpload
in class BaseAbstractGoogleAsyncWriteChannel<S>
IOException
Copyright © 2020. All rights reserved.