Class SearchIndexingBufferedSender<T>
- Type Parameters:
T- The type of the document handled by this buffered indexing sender.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddActions(Collection<IndexAction<T>> actions) Adds document index actions to the batch.voidaddActions(Collection<IndexAction<T>> actions, Duration timeout, com.azure.core.util.Context context) Adds document index actions to the batch.voidaddDeleteActions(Collection<T> documents) Adds delete document actions to the batch.voidaddDeleteActions(Collection<T> documents, Duration timeout, com.azure.core.util.Context context) Adds delete document actions to the batch.voidaddMergeActions(Collection<T> documents) Adds merge document actions to the batch.voidaddMergeActions(Collection<T> documents, Duration timeout, com.azure.core.util.Context context) Adds merge document actions to the batch.voidaddMergeOrUploadActions(Collection<T> documents) Adds merge or upload document actions to the batch.voidaddMergeOrUploadActions(Collection<T> documents, Duration timeout, com.azure.core.util.Context context) Adds merge or upload document actions to the batch.voidaddUploadActions(Collection<T> documents) Adds upload document actions to the batch.voidaddUploadActions(Collection<T> documents, Duration timeout, com.azure.core.util.Context context) Adds upload document actions to the batch.voidclose()Closes the buffered sender, any documents remaining in the batch will be sent to the Search index for indexing.voidCloses the buffered, any documents remaining in the batch yet to be sent to the Search index for indexing.voidflush()Sends the current batch of documents to be indexed.voidSends the current batch of documents to be indexed.Gets the list ofIndexActionsin the batch that are ready to be indexed.
-
Method Details
-
getActions
Gets the list ofIndexActionsin the batch that are ready to be indexed.- Returns:
- The list of
IndexActionsin the batch that are ready to be indexed.
-
addUploadActions
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.
-
addUploadActions
public void addUploadActions(Collection<T> documents, Duration timeout, com.azure.core.util.Context context) 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.timeout- Duration before the operation times out.context- Additional context that is passed through the HTTP pipeline.
-
addDeleteActions
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.
-
addDeleteActions
public void addDeleteActions(Collection<T> documents, Duration timeout, com.azure.core.util.Context context) 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.timeout- Duration before the operation times out.context- Additional context that is passed through the HTTP pipeline.
-
addMergeActions
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.
-
addMergeActions
public void addMergeActions(Collection<T> documents, Duration timeout, com.azure.core.util.Context context) 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.timeout- Duration before the operation times out.context- Additional context that is passed through the HTTP pipeline.
-
addMergeOrUploadActions
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.
-
addMergeOrUploadActions
public void addMergeOrUploadActions(Collection<T> documents, Duration timeout, com.azure.core.util.Context context) 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.timeout- Duration before the operation times out.context- Additional context that is passed through the HTTP pipeline.
-
addActions
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.
-
addActions
public void addActions(Collection<IndexAction<T>> actions, Duration timeout, com.azure.core.util.Context context) 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.timeout- Duration before the operation times out.context- Additional context that is passed through the HTTP pipeline.
-
flush
public void flush()Sends the current batch of documents to be indexed. -
flush
Sends the current batch of documents to be indexed.- Parameters:
timeout- Duration before the operation times out.context- Additional context that is passed through the HTTP pipeline.
-
close
public 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
IllegalStateExceptionto be thrown. -
close
Closes the buffered, any documents remaining in the batch yet to 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
IllegalStateExceptionto be thrown.- Parameters:
timeout- Duration before the operation times out.context- Additional context that is passed through the HTTP pipeline.
-