BatchingIndexingService
Stay organized with collections
Save and categorize content based on your preferences.
Known Indirect Subclasses
|
Indexing Service for batching multiple API requests.
This service provides the ability to group a set of API requests together in order to send
them to Cloud Search in a single submission. The submission triggers are configurable using a
BatchPolicy
object. This is commonly used by IndexingServiceImpl
for API requests
that return empty response objects, such as push and delete.
Batched API operations are executed asynchronously. The caller can use the
get()
method to obtain the result of a batched request. The caller can
also use addListener(Runnable, Executor)
or
addCallback(ListenableFuture, FutureCallback)
to register callback methods to retrieve results from the batched operation.
Public Method Summary
abstract
ListenableFuture<Operation>
|
deleteItem(CloudSearch.Indexing.Datasources.Items.Delete deleteItem)
Adds a delete item request to the batch.
|
abstract
ListenableFuture<Operation>
|
indexItem(CloudSearch.Indexing.Datasources.Items.Index indexItem)
Adds an index item request to the batch.
|
abstract
ListenableFuture<Item>
|
pushItem(CloudSearch.Indexing.Datasources.Items.Push pushItem)
Adds a push item request to the batch.
|
abstract
ListenableFuture<Operation>
|
unreserveItem(CloudSearch.Indexing.Datasources.Items.Unreserve unreserveItem)
Adds an unreserve queue request to the batch.
|
Inherited Method Summary
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()
|
Public Methods
public
abstract
ListenableFuture<Operation>
deleteItem
(CloudSearch.Indexing.Datasources.Items.Delete deleteItem)
Adds a delete item request to the batch.
public
abstract
ListenableFuture<Operation>
indexItem
(CloudSearch.Indexing.Datasources.Items.Index indexItem)
Adds an index item request to the batch.
public
abstract
ListenableFuture<Item>
pushItem
(CloudSearch.Indexing.Datasources.Items.Push pushItem)
Adds a push item request to the batch.
public
abstract
ListenableFuture<Operation>
unreserveItem
(CloudSearch.Indexing.Datasources.Items.Unreserve unreserveItem)
Adds an unreserve queue request to the batch.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-03-18 UTC.
[null,null,["Last updated 2025-03-18 UTC."],[],[],null,["# BatchingIndexingService\n\npublic interface **BatchingIndexingService** implements Service \n\n|---|---|---|\n| Known Indirect Subclasses [BatchingIndexingServiceImpl](/workspace/cloud-search/docs/reference/sdk/com/google/enterprise/cloudsearch/sdk/indexing/BatchingIndexingServiceImpl) |------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [BatchingIndexingServiceImpl](/workspace/cloud-search/docs/reference/sdk/com/google/enterprise/cloudsearch/sdk/indexing/BatchingIndexingServiceImpl) | Concrete class implementing [BatchingIndexingService](/workspace/cloud-search/docs/reference/sdk/com/google/enterprise/cloudsearch/sdk/indexing/BatchingIndexingService). | |||\n\nIndexing Service for batching multiple API requests.\n\nThis service provides the ability to group a set of API requests together in order to send\nthem to Cloud Search in a single submission. The submission triggers are configurable using a\n[BatchPolicy](/workspace/cloud-search/docs/reference/sdk/com/google/enterprise/cloudsearch/sdk/BatchPolicy) object. This is commonly used by [IndexingServiceImpl](/workspace/cloud-search/docs/reference/sdk/com/google/enterprise/cloudsearch/sdk/indexing/IndexingServiceImpl) for API requests\nthat return empty response objects, such as push and delete.\n\nBatched API operations are executed asynchronously. The caller can use the\n[get()](/workspace/cloud-search/docs/reference/sdk/java/util/concurrent/Future#get()) method to obtain the result of a batched request. The caller can\nalso use [addListener(Runnable, Executor)](/workspace/cloud-search/docs/reference/sdk/com/google/common/util/concurrent/ListenableFuture#addListener(java.lang.Runnable, java.util.concurrent.Executor)) or\n[addCallback(ListenableFuture, FutureCallback)](/workspace/cloud-search/docs/reference/sdk/com/google/common/util/concurrent/Futures#addCallback(com.google.common.util.concurrent.ListenableFuture\u003cV\u003e, com.google.common.util.concurrent.FutureCallback\u003c? super V\u003e))\nto register callback methods to retrieve results from the batched operation. \n\n### Public Method Summary\n\n|----------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract ListenableFuture\\\u003cOperation\\\u003e | [deleteItem](/workspace/cloud-search/docs/reference/sdk/com/google/enterprise/cloudsearch/sdk/indexing/BatchingIndexingService#deleteItem(com.google.api.services.cloudsearch.v1.CloudSearch.Indexing.Datasources.Items.Delete))(CloudSearch.Indexing.Datasources.Items.Delete deleteItem) Adds a delete item request to the batch. |\n| abstract ListenableFuture\\\u003cOperation\\\u003e | [indexItem](/workspace/cloud-search/docs/reference/sdk/com/google/enterprise/cloudsearch/sdk/indexing/BatchingIndexingService#indexItem(com.google.api.services.cloudsearch.v1.CloudSearch.Indexing.Datasources.Items.Index))(CloudSearch.Indexing.Datasources.Items.Index indexItem) Adds an index item request to the batch. |\n| abstract ListenableFuture\\\u003cItem\\\u003e | [pushItem](/workspace/cloud-search/docs/reference/sdk/com/google/enterprise/cloudsearch/sdk/indexing/BatchingIndexingService#pushItem(com.google.api.services.cloudsearch.v1.CloudSearch.Indexing.Datasources.Items.Push))(CloudSearch.Indexing.Datasources.Items.Push pushItem) Adds a push item request to the batch. |\n| abstract ListenableFuture\\\u003cOperation\\\u003e | [unreserveItem](/workspace/cloud-search/docs/reference/sdk/com/google/enterprise/cloudsearch/sdk/indexing/BatchingIndexingService#unreserveItem(com.google.api.services.cloudsearch.v1.CloudSearch.Indexing.Datasources.Items.Unreserve))(CloudSearch.Indexing.Datasources.Items.Unreserve unreserveItem) Adds an unreserve queue request to the batch. |\n\n### Inherited Method Summary\n\nFrom interface com.google.common.util.concurrent.Service \n\n|------------------------|---------------------------------------------------|\n| abstract void | addListener(Service.Listener arg0, Executor arg1) |\n| abstract void | awaitRunning() |\n| abstract void | awaitRunning(long arg0, TimeUnit arg1) |\n| abstract void | awaitTerminated(long arg0, TimeUnit arg1) |\n| abstract void | awaitTerminated() |\n| abstract Throwable | failureCause() |\n| abstract boolean | isRunning() |\n| abstract Service | startAsync() |\n| abstract Service.State | state() |\n| abstract Service | stopAsync() |\n\nPublic Methods\n--------------\n\n#### public abstract ListenableFuture\\\u003cOperation\\\u003e\n**deleteItem**\n(CloudSearch.Indexing.Datasources.Items.Delete deleteItem)\n\nAdds a delete item request to the batch. \n\n##### Parameters\n\n| deleteItem | |\n|------------|---|\n\n##### Throws\n\n| InterruptedException | |\n|----------------------|---|\n\n#### public abstract ListenableFuture\\\u003cOperation\\\u003e\n**indexItem**\n(CloudSearch.Indexing.Datasources.Items.Index indexItem)\n\nAdds an index item request to the batch. \n\n##### Parameters\n\n| indexItem | |\n|-----------|---|\n\n##### Throws\n\n| InterruptedException | |\n|----------------------|---|\n\n#### public abstract ListenableFuture\\\u003cItem\\\u003e\n**pushItem**\n(CloudSearch.Indexing.Datasources.Items.Push pushItem)\n\nAdds a push item request to the batch. \n\n##### Parameters\n\n| pushItem | |\n|----------|---|\n\n##### Throws\n\n| InterruptedException | |\n|----------------------|---|\n\n#### public abstract ListenableFuture\\\u003cOperation\\\u003e\n**unreserveItem**\n(CloudSearch.Indexing.Datasources.Items.Unreserve unreserveItem)\n\nAdds an unreserve queue request to the batch. \n\n##### Parameters\n\n| unreserveItem | |\n|---------------|---|\n\n##### Throws\n\n| InterruptedException | |\n|----------------------|---|"]]