public class SolrServerDocumentLoader extends Object implements DocumentLoader
SolrServer.| Constructor and Description |
|---|
SolrServerDocumentLoader(SolrServer server,
int batchSize) |
| Modifier and Type | Method and Description |
|---|---|
void |
beginTransaction()
Begins a transaction
|
void |
commitTransaction()
Sends any outstanding documents to the destination and waits for a positive
or negative ack (i.e.
|
SolrServer |
getSolrServer() |
void |
load(SolrInputDocument doc)
Loads the given document into the destination
|
SolrPingResponse |
ping()
Issues a ping request to check if the server is alive
|
UpdateResponse |
rollbackTransaction()
Performs a rollback of all non-committed documents pending.
|
void |
shutdown()
Releases allocated resources
|
public SolrServerDocumentLoader(SolrServer server, int batchSize)
public void beginTransaction()
DocumentLoaderbeginTransaction in interface DocumentLoaderpublic void load(SolrInputDocument doc) throws IOException, SolrServerException
DocumentLoaderload in interface DocumentLoaderIOExceptionSolrServerExceptionpublic void commitTransaction()
throws SolrServerException,
IOException
DocumentLoadercommitTransaction in interface DocumentLoaderIOException - If there is a low-level I/O error.SolrServerExceptionpublic UpdateResponse rollbackTransaction() throws SolrServerException, IOException
DocumentLoaderNote that this is not a true rollback as in databases. Content you have previously added may have already been committed due to autoCommit, buffer full, other client performing a commit etc. So this is only a best-effort rollback.
rollbackTransaction in interface DocumentLoaderIOException - If there is a low-level I/O error.SolrServerExceptionpublic void shutdown()
DocumentLoadershutdown in interface DocumentLoaderpublic SolrPingResponse ping() throws SolrServerException, IOException
DocumentLoaderping in interface DocumentLoaderIOException - If there is a low-level I/O error.SolrServerExceptionpublic SolrServer getSolrServer()
Copyright © 2000-2015 Apache Software Foundation. All Rights Reserved.