DocumentsWriterPerThreadPool

DocumentsWriterPerThreadPool controls DocumentsWriterPerThread instances and their thread assignments during indexing. Each DocumentsWriterPerThread is, once obtained from the pool, exclusively used for indexing a single document or list of documents by the obtaining thread. Each indexing thread must obtain such a DocumentsWriterPerThread to make progress. Depending on the DocumentsWriterPerThreadPool implementation [ ] assignments might differ from document to document.

Once a DocumentsWriterPerThread is selected for flush, the [ ] will be checked out of the thread pool and won't be reused for indexing. See .checkout.

Constructors

Link copied to clipboard
constructor(dwptFactory: () -> DocumentsWriterPerThread)

Functions

Link copied to clipboard

Removes the given DWPT from the pool unless it's already been removed before.

Link copied to clipboard
open override fun close()
Link copied to clipboard

Filters all DWPTs the given predicate applies to and that can be checked out of the pool via .checkout. All DWPTs returned from this method are already locked and .isRegistered will return true for all returned DWPTs

Link copied to clipboard

This method is used by DocumentsWriter/FlushControl to obtain a DWPT to do an indexing operation (add/updateDocument).

Link copied to clipboard

Returns true if this DWPT is still part of the pool

Link copied to clipboard
open operator override fun iterator(): MutableIterator<DocumentsWriterPerThread>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun size(): Int

Returns the active number of DocumentsWriterPerThread instances.

Link copied to clipboard