Package org.apache.lucene.monitor
Class DocumentBatch
- java.lang.Object
-
- org.apache.lucene.monitor.DocumentBatch
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,java.util.function.Supplier<LeafReader>
- Direct Known Subclasses:
DocumentBatch.MultiDocumentBatch
,DocumentBatch.SingletonDocumentBatch
abstract class DocumentBatch extends java.lang.Object implements java.io.Closeable, java.util.function.Supplier<LeafReader>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
DocumentBatch.MultiDocumentBatch
private static class
DocumentBatch.SingletonDocumentBatch
-
Constructor Summary
Constructors Constructor Description DocumentBatch()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static DocumentBatch
of(Analyzer analyzer, Document doc)
Create a DocumentBatch containing a single InputDocumentstatic DocumentBatch
of(Analyzer analyzer, Document... docs)
Create a DocumentBatch containing a set of InputDocuments
-
-
-
Method Detail
-
of
public static DocumentBatch of(Analyzer analyzer, Document doc)
Create a DocumentBatch containing a single InputDocument- Parameters:
doc
- the document to add- Returns:
- the batch containing the input document
-
of
public static DocumentBatch of(Analyzer analyzer, Document... docs)
Create a DocumentBatch containing a set of InputDocuments- Parameters:
docs
- Collection of documents to add. There must be at least one document in the collection.- Returns:
- the batch containing the input documents
-
-