# ContentUploadServiceImpl

public class **ContentUploadServiceImpl** extends [BaseApiService](https://developers.google.com/workspace/cloud-search/docs/reference/sdk/com/google/enterprise/cloudsearch/sdk/BaseApiService)\<CloudSearch\>  
implements [ContentUploadService](https://developers.google.com/workspace/cloud-search/docs/reference/sdk/com/google/enterprise/cloudsearch/sdk/indexing/ContentUploadService) Concrete class implementing `https://developers.google.com/workspace/cloud-search/docs/reference/sdk/com/google/enterprise/cloudsearch/sdk/indexing/ContentUploadService`

Document content uploads normally occur "in-line" as part of the item's upload request.
However, when the content is large, this upload service can optimize content uploads by
separating the content from the item's upload request. This results in a "two-step" process for
indexing a document into Cloud Search.

The deterministic threshold for "in-line" versus using this service is settable using the
configuration parameter `https://developers.google.com/workspace/cloud-search/docs/reference/sdk`. The
SDK default byte value is `https://developers.google.com/workspace/cloud-search/docs/reference/sdk`.

### Nested Class Summary

|---|---|---|---|
| class | [ContentUploadServiceImpl.Builder](https://developers.google.com/workspace/cloud-search/docs/reference/sdk/com/google/enterprise/cloudsearch/sdk/indexing/ContentUploadServiceImpl.Builder) || Builder to create an instance of `https://developers.google.com/workspace/cloud-search/docs/reference/sdk/com/google/enterprise/cloudsearch/sdk/indexing/ContentUploadServiceImpl`. |

### Field Summary

|---|---|---|
| public static final Set\<String\> | [API_SCOPES](https://developers.google.com/workspace/cloud-search/docs/reference/sdk/com/google/enterprise/cloudsearch/sdk/indexing/ContentUploadServiceImpl#API_SCOPES) | API scope for uploading content using Cloud Search API. |

### Public Method Summary

|---|---|
| ListenableFuture\<Void\> | [uploadContent](https://developers.google.com/workspace/cloud-search/docs/reference/sdk/com/google/enterprise/cloudsearch/sdk/indexing/ContentUploadServiceImpl#uploadContent(java.lang.String, com.google.api.client.http.AbstractInputStreamContent))(String resourceName, AbstractInputStreamContent content) Uploads `https://developers.google.com/workspace/cloud-search/docs/reference/sdk/com/google/api/client/http/AbstractInputStreamContent` content for specified resource name obtained using the Cloud Search upload method. |

### Inherited Method Summary

From class com.google.common.util.concurrent.AbstractIdleService

|---|---|
| final void | addListener(Service.Listener arg0, Executor arg1) |
| final void | awaitRunning() |
| final void | awaitRunning(long arg0, TimeUnit arg1) |
| final void | awaitTerminated(long arg0, TimeUnit arg1) |
| final void | awaitTerminated() |
| final Throwable | failureCause() |
| final boolean | isRunning() |
| final Service | startAsync() |
| final Service.State | state() |
| final Service | stopAsync() |
| String | toString() |

From class java.lang.Object

|---|---|
| boolean | equals(Object arg0) |
| final Class\<?\> | getClass() |
| int | hashCode() |
| final void | notify() |
| final void | notifyAll() |
| String | toString() |
| final void | wait(long arg0, int arg1) |
| final void | wait(long arg0) |
| final void | wait() |

From interface com.google.common.util.concurrent.Service

|---|---|
| abstract void | addListener(Service.Listener arg0, Executor arg1) |
| abstract void | awaitRunning() |
| abstract void | awaitRunning(long arg0, TimeUnit arg1) |
| abstract void | awaitTerminated(long arg0, TimeUnit arg1) |
| abstract void | awaitTerminated() |
| abstract Throwable | failureCause() |
| abstract boolean | isRunning() |
| abstract Service | startAsync() |
| abstract Service.State | state() |
| abstract Service | stopAsync() |

From interface [com.google.enterprise.cloudsearch.sdk.indexing.ContentUploadService](https://developers.google.com/workspace/cloud-search/docs/reference/sdk/com/google/enterprise/cloudsearch/sdk/indexing/ContentUploadService)

|---|---|
| abstract ListenableFuture\<Void\> | [uploadContent](https://developers.google.com/workspace/cloud-search/docs/reference/sdk/com/google/enterprise/cloudsearch/sdk/indexing/ContentUploadService#uploadContent(java.lang.String, com.google.api.client.http.AbstractInputStreamContent))(String resourceName, AbstractInputStreamContent content) Uploads `https://developers.google.com/workspace/cloud-search/docs/reference/sdk/com/google/api/client/http/AbstractInputStreamContent` content for specified resource name obtained using the Cloud Search upload method. |

## Fields

#### public static final Set\<String\>
**API_SCOPES**

API scope for uploading content using Cloud Search API.

## Public Methods

#### public ListenableFuture\<Void\>
**uploadContent**
(String resourceName, AbstractInputStreamContent content)

Uploads `https://developers.google.com/workspace/cloud-search/docs/reference/sdk/com/google/api/client/http/AbstractInputStreamContent` content for specified resource name obtained using
the Cloud Search upload method.

##### Parameters

| resourceName | resource name for content to be uploaded. |
| content | `https://developers.google.com/workspace/cloud-search/docs/reference/sdk/com/google/api/client/http/AbstractInputStreamContent` to upload |
|---|---|

##### Returns

- `https://developers.google.com/workspace/cloud-search/docs/reference/sdk/com/google/common/util/concurrent/ListenableFuture` representing upload result

##### Throws

| IOException |   |
|---|---|