你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
SearchIndexingBufferedSender<T> Class
- java.
lang. Object - com.
azure. search. documents. SearchIndexingBufferedSender<T>
- com.
Type Parameters
- T
The type of the document handled by this buffered indexing sender.
public final class SearchIndexingBufferedSender
This class provides a buffered sender that contains operations for conveniently indexing documents to an Azure Search index.
Method Summary
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, 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, 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, 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, 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, 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, Context context)
Closes the buffered, any documents remaining in the batch yet to be sent to the Search index for indexing. |
void |
flush()
Sends the current batch of documents to be indexed. |
void |
flush(Duration timeout, Context context)
Sends the current batch of documents to be indexed. |
Collection<Index |
getActions()
Gets the list of IndexAction<T> in the batch that are ready to be indexed. |
Methods inherited from java.lang.Object
Method Details
addActions
public void addActions(Collection
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:
addActions
public void addActions(Collection
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:
addDeleteActions
public void addDeleteActions(Collection
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:
addDeleteActions
public void addDeleteActions(Collection
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:
addMergeActions
public void addMergeActions(Collection
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:
addMergeActions
public void addMergeActions(Collection
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:
addMergeOrUploadActions
public void addMergeOrUploadActions(Collection
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:
addMergeOrUploadActions
public void addMergeOrUploadActions(Collection
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:
addUploadActions
public void addUploadActions(Collection
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:
addUploadActions
public void addUploadActions(Collection
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:
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 IllegalStateException to be thrown.
close
public void close(Duration timeout, Context context)
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 IllegalStateException to be thrown.
Parameters:
flush
public void flush()
Sends the current batch of documents to be indexed.
flush
public void flush(Duration timeout, Context context)
Sends the current batch of documents to be indexed.
Parameters:
getActions
public Collection
Gets the list of IndexAction<T> in the batch that are ready to be indexed.
Returns: