public final class DocumentBufferedOutputStreamImpl<T> extends java.lang.Object implements DocumentBufferedOutputStream<T>
Modifier and Type | Field and Description |
---|---|
private int |
batchSize |
private CoreIdentifier |
core |
private ItemToSolrInputDocumentConverter<T> |
docConverter |
private java.util.Collection<org.apache.solr.common.SolrInputDocument> |
docs |
private SolrClient |
solrjClient |
Constructor and Description |
---|
DocumentBufferedOutputStreamImpl(SolrClientConfiguration config,
SolrClient solrjClient,
ItemToSolrInputDocumentConverter<T> docConverter,
CoreIdentifier core) |
Modifier and Type | Method and Description |
---|---|
private void |
_flush() |
boolean |
add(T item) |
void |
commit() |
void |
flush() |
int |
getOutgoingDocumentsSize() |
private boolean |
isBufferFull() |
private final java.util.Collection<org.apache.solr.common.SolrInputDocument> docs
private final SolrClient solrjClient
private final ItemToSolrInputDocumentConverter<T> docConverter
private final CoreIdentifier core
private final int batchSize
@Inject public DocumentBufferedOutputStreamImpl(SolrClientConfiguration config, SolrClient solrjClient, ItemToSolrInputDocumentConverter<T> docConverter, CoreIdentifier core)
public boolean add(T item) throws org.apache.solr.client.solrj.SolrServerException, java.io.IOException
add
in interface DocumentBufferedOutputStream<T>
org.apache.solr.client.solrj.SolrServerException
java.io.IOException
private boolean isBufferFull()
public void flush() throws org.apache.solr.client.solrj.SolrServerException, java.io.IOException
flush
in interface DocumentBufferedOutputStream<T>
org.apache.solr.client.solrj.SolrServerException
java.io.IOException
private void _flush() throws org.apache.solr.client.solrj.SolrServerException, java.io.IOException
org.apache.solr.client.solrj.SolrServerException
java.io.IOException
public int getOutgoingDocumentsSize()
public void commit() throws org.apache.solr.client.solrj.SolrServerException, java.io.IOException
commit
in interface DocumentBufferedOutputStream<T>
org.apache.solr.client.solrj.SolrServerException
java.io.IOException