public final class SearchIndexingBufferedSender<T> extends Object
Modifier and Type | Method and Description |
---|---|
void |
addActions(Collection<IndexAction<T>> actions)
Adds document index actions to the batch.
|
void |
addActions(Collection<IndexAction<T>> actions,
Duration timeout,
com.azure.core.util.Context context)
Adds document index actions to the batch.
|
void |
addDeleteActions(Collection<T> documents)
Adds delete document actions to the batch.
|
void |
addDeleteActions(Collection<T> documents,
Duration timeout,
com.azure.core.util.Context context)
Adds delete document actions to the batch.
|
void |
addMergeActions(Collection<T> documents)
Adds merge document actions to the batch.
|
void |
addMergeActions(Collection<T> documents,
Duration timeout,
com.azure.core.util.Context context)
Adds merge document actions to the batch.
|
void |
addMergeOrUploadActions(Collection<T> documents)
Adds merge or upload document actions to the batch.
|
void |
addMergeOrUploadActions(Collection<T> documents,
Duration timeout,
com.azure.core.util.Context context)
Adds merge or upload document actions to the batch.
|
void |
addUploadActions(Collection<T> documents)
Adds upload document actions to the batch.
|
void |
addUploadActions(Collection<T> documents,
Duration timeout,
com.azure.core.util.Context context)
Adds upload document actions to the batch.
|
void |
close()
Closes the buffered sender, any documents remaining in the batch will be sent to the Search index for indexing.
|
void |
close(Duration timeout,
com.azure.core.util.Context context)
Closes the buffered, any documents remaining in the batch sill be sent to the Search index for indexing.
|
void |
flush()
Sends the current batch of documents to be indexed.
|
void |
flush(Duration timeout,
com.azure.core.util.Context context)
Sends the current batch of documents to be indexed.
|
Collection<IndexAction<T>> |
getActions()
Gets the list of
IndexActions in the batch that are ready to be indexed. |
public Collection<IndexAction<T>> getActions()
IndexActions
in the batch that are ready to be indexed.IndexActions
in the batch that are ready to be indexed.public void addUploadActions(Collection<T> documents)
If the client is enabled for automatic batch sending, adding documents may trigger the batch to be sent for indexing.
documents
- Documents to be uploaded.public void addUploadActions(Collection<T> documents, Duration timeout, com.azure.core.util.Context context)
If the client is enabled for automatic batch sending, adding documents may trigger the batch to be sent for indexing.
documents
- Documents to be uploaded.timeout
- Duration before the operation times out.context
- Additional context that is passed through the HTTP pipeline.public void addDeleteActions(Collection<T> documents)
If the client is enabled for automatic batch sending, adding documents may trigger the batch to be sent for indexing.
documents
- Documents to be deleted.public void addDeleteActions(Collection<T> documents, Duration timeout, com.azure.core.util.Context context)
If the client is enabled for automatic batch sending, adding documents may trigger the batch to be sent for indexing.
documents
- Documents to be deleted.timeout
- Duration before the operation times out.context
- Additional context that is passed through the HTTP pipeline.public void addMergeActions(Collection<T> documents)
If the client is enabled for automatic batch sending, adding documents may trigger the batch to be sent for indexing.
documents
- Documents to be merged.public void addMergeActions(Collection<T> documents, Duration timeout, com.azure.core.util.Context context)
If the client is enabled for automatic batch sending, adding documents may trigger the batch to be sent for indexing.
documents
- Documents to be merged.timeout
- Duration before the operation times out.context
- Additional context that is passed through the HTTP pipeline.public void addMergeOrUploadActions(Collection<T> documents)
If the client is enabled for automatic batch sending, adding documents may trigger the batch to be sent for indexing.
documents
- Documents to be merged or uploaded.public void addMergeOrUploadActions(Collection<T> documents, Duration timeout, com.azure.core.util.Context context)
If the client is enabled for automatic batch sending, adding documents may trigger the batch to be sent for indexing.
documents
- Documents to be merged or uploaded.timeout
- Duration before the operation times out.context
- Additional context that is passed through the HTTP pipeline.public void addActions(Collection<IndexAction<T>> actions)
If the client is enabled for automatic batch sending, adding documents may trigger the batch to be sent for indexing.
actions
- Index actions.public void addActions(Collection<IndexAction<T>> actions, Duration timeout, com.azure.core.util.Context context)
If the client is enabled for automatic batch sending, adding documents may trigger the batch to be sent for indexing.
actions
- Index actions.timeout
- Duration before the operation times out.context
- Additional context that is passed through the HTTP pipeline.public void flush()
public void flush(Duration timeout, com.azure.core.util.Context context)
timeout
- Duration before the operation times out.context
- Additional context that is passed through the HTTP pipeline.public void close()
Once the buffered sender has been closed any attempts to add documents or flush it will cause an IllegalStateException
to be thrown.
public void close(Duration timeout, com.azure.core.util.Context context)
Once the buffered sender has been closed any attempts to add documents or flush it will cause an IllegalStateException
to be thrown.
timeout
- Duration before the operation times out.context
- Additional context that is passed through the HTTP pipeline.Copyright © 2021 Microsoft Corporation. All rights reserved.