Package com.azure.search.documents
Class SearchIndexingBufferedAsyncSender<T>
- java.lang.Object
-
- com.azure.search.documents.SearchIndexingBufferedAsyncSender<T>
-
public final class SearchIndexingBufferedAsyncSender<T> extends Object
This class provides a buffered sender that contains operations for conveniently indexing documents to an Azure Search index.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Mono<Void>
addActions(Collection<IndexAction<T>> actions)
Adds document index actions to the batch.Mono<Void>
addDeleteActions(Collection<T> documents)
Adds delete document actions to the batch.Mono<Void>
addMergeActions(Collection<T> documents)
Adds merge document actions to the batch.Mono<Void>
addMergeOrUploadActions(Collection<T> documents)
Adds merge or upload document actions to the batch.Mono<Void>
addUploadActions(Collection<T> documents)
Adds upload document actions to the batch.Mono<Void>
close()
Closes the buffered sender, any documents remaining in the batch will be sent to the Search index for indexing.Mono<Void>
flush()
Sends the current batch of documents to be indexed.Collection<IndexAction<T>>
getActions()
Gets theIndexActions
in the batch that are ready to be indexed.
-
-
-
Method Detail
-
getActions
public Collection<IndexAction<T>> getActions()
Gets theIndexActions
in the batch that are ready to be indexed.- Returns:
- The
IndexActions
in the batch that are ready to be indexed.
-
addUploadActions
public Mono<Void> addUploadActions(Collection<T> documents)
Adds upload document actions to the batch.If the client is enabled for automatic batch sending, adding documents may trigger the batch to be sent for indexing.
- Parameters:
documents
- Documents to be uploaded.- Returns:
- A reactive response indicating that the documents have been added to the batch.
-
addDeleteActions
public Mono<Void> addDeleteActions(Collection<T> documents)
Adds delete document actions to the batch.If the client is enabled for automatic batch sending, adding documents may trigger the batch to be sent for indexing.
- Parameters:
documents
- Documents to be deleted.- Returns:
- A reactive response indicating that the documents have been added to the batch.
-
addMergeActions
public Mono<Void> addMergeActions(Collection<T> documents)
Adds merge document actions to the batch.If the client is enabled for automatic batch sending, adding documents may trigger the batch to be sent for indexing.
- Parameters:
documents
- Documents to be merged.- Returns:
- A reactive response indicating that the documents have been added to the batch.
-
addMergeOrUploadActions
public Mono<Void> addMergeOrUploadActions(Collection<T> documents)
Adds merge or upload document actions to the batch.If the client is enabled for automatic batch sending, adding documents may trigger the batch to be sent for indexing.
- Parameters:
documents
- Documents to be merged or uploaded.- Returns:
- A reactive response indicating that the documents have been added to the batch.
-
addActions
public Mono<Void> addActions(Collection<IndexAction<T>> actions)
Adds document index actions to the batch.If the client is enabled for automatic batch sending, adding documents may trigger the batch to be sent for indexing.
- Parameters:
actions
- Index actions.- Returns:
- A reactive response indicating that the documents have been added to the batch.
-
flush
public Mono<Void> flush()
Sends the current batch of documents to be indexed.- Returns:
- A reactive response that indicates if the flush operation has completed.
-
close
public Mono<Void> close()
Closes the buffered sender, any documents remaining in the batch will be sent to the Search index for indexing.Once the buffered sender has been closed any attempts to add documents or flush it will cause an
IllegalStateException
to be thrown.- Returns:
- A reactive response indicating that the buffered sender has been closed.
-
-