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.
Functions
Removes the given DWPT from the pool unless it's already been removed before.
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
This method is used by DocumentsWriter/FlushControl to obtain a DWPT to do an indexing operation (add/updateDocument).
Returns true if this DWPT is still part of the pool
Returns the active number of DocumentsWriterPerThread instances.