Package org.ametys.cms.search.solr
Class NoAutoCommitUpdateClient
- java.lang.Object
-
- org.apache.solr.client.solrj.SolrClient
-
- org.apache.solr.client.solrj.impl.ConcurrentUpdateSolrClient
-
- org.ametys.cms.search.solr.AbstractAmetysConcurrentUpdateClient
-
- org.ametys.cms.search.solr.NoAutoCommitUpdateClient
-
- All Implemented Interfaces:
Closeable
,Serializable
,AutoCloseable
public class NoAutoCommitUpdateClient extends AbstractAmetysConcurrentUpdateClient
UpdateSolrClient
which uses the Solr `noAutoCommit` Update Request Processor chain, so as to not trigger the autoCommit mechanism.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private static String
__UPDATE_CHAIN_NAME
-
Constructor Summary
Constructors Constructor Description NoAutoCommitUpdateClient(String solrServerUrl, Optional<Integer> solrSocketTimeout, String collectionName, int queueSize, int threadCount, org.slf4j.Logger logger)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
_setUpdateRequestProcessorChain(org.apache.solr.client.solrj.SolrRequest request)
org.apache.solr.common.util.NamedList<Object>
request(org.apache.solr.client.solrj.SolrRequest request, String collection)
-
Methods inherited from class org.ametys.cms.search.solr.AbstractAmetysConcurrentUpdateClient
add, add, add, add, add, add, add, add, add, add, addBean, addBean, addBean, addBean, addBeans, addBeans, addBeans, addBeans, addBeans, addBeans, commit, commit, commit, commit, commit, commit, deleteById, deleteById, deleteById, deleteById, deleteById, deleteById, deleteById, deleteById, deleteByQuery, deleteByQuery, deleteByQuery, deleteByQuery, handleError, onSuccess, optimize, optimize, optimize, optimize, optimize, optimize, rollback, rollback
-
Methods inherited from class org.apache.solr.client.solrj.impl.ConcurrentUpdateSolrClient
blockUntilFinished, close, getQueryParams, setConnectionTimeout, setParser, setPollQueueTime, setQueryParams, setRequestWriter, setSoTimeout, shutdownNow
-
-
-
-
Field Detail
-
__UPDATE_CHAIN_NAME
private static final String __UPDATE_CHAIN_NAME
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
NoAutoCommitUpdateClient
public NoAutoCommitUpdateClient(String solrServerUrl, Optional<Integer> solrSocketTimeout, String collectionName, int queueSize, int threadCount, org.slf4j.Logger logger)
Constructor- Parameters:
solrServerUrl
- The Solr server URLsolrSocketTimeout
- The Solr socket timeout (in millis)collectionName
- The name of the collection, on which operations will be allowed. Operations on other collections will be forbidden.queueSize
- The buffer size before the documents are sent to the serverthreadCount
- The number of background threads used to empty the queuelogger
- internal logger
-
-
Method Detail
-
request
public org.apache.solr.common.util.NamedList<Object> request(org.apache.solr.client.solrj.SolrRequest request, String collection) throws org.apache.solr.client.solrj.SolrServerException, IOException
- Overrides:
request
in classorg.apache.solr.client.solrj.impl.ConcurrentUpdateSolrClient
- Throws:
org.apache.solr.client.solrj.SolrServerException
IOException
-
_setUpdateRequestProcessorChain
private void _setUpdateRequestProcessorChain(org.apache.solr.client.solrj.SolrRequest request)
-
-