Package org.ametys.cms.search.solr
Class AbstractAmetysConcurrentUpdateClient
java.lang.Object
org.apache.solr.client.solrj.SolrClient
org.apache.solr.client.solrj.impl.ConcurrentUpdateSolrClient
org.ametys.cms.search.solr.AbstractAmetysConcurrentUpdateClient
- All Implemented Interfaces:
- Closeable,- Serializable,- AutoCloseable
- Direct Known Subclasses:
- DefaultUpdateClient,- NoAutoCommitUpdateClient
public abstract class AbstractAmetysConcurrentUpdateClient
extends org.apache.solr.client.solrj.impl.ConcurrentUpdateSolrClient
Concurrent update solr client specific for Ametys.
Allow operations on only one collection (specified by the constructor), and forbid operations on all other collections. Delegate the processing to the ConcurrentUpdateSolrClient (superclass) if the collection is the one in use
Allow operations on only one collection (specified by the constructor), and forbid operations on all other collections. Delegate the processing to the ConcurrentUpdateSolrClient (superclass) if the collection is the one in use
- See Also:
- 
Nested Class SummaryNested classes/interfaces inherited from class org.apache.solr.client.solrj.impl.ConcurrentUpdateSolrClientorg.apache.solr.client.solrj.impl.ConcurrentUpdateSolrClient.Builder
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionorg.apache.solr.client.solrj.response.UpdateResponseadd(String collection, Collection<org.apache.solr.common.SolrInputDocument> docs) org.apache.solr.client.solrj.response.UpdateResponseadd(String collection, Collection<org.apache.solr.common.SolrInputDocument> docs, int commitWithinMs) org.apache.solr.client.solrj.response.UpdateResponseorg.apache.solr.client.solrj.response.UpdateResponseorg.apache.solr.client.solrj.response.UpdateResponseorg.apache.solr.client.solrj.response.UpdateResponseadd(Collection<org.apache.solr.common.SolrInputDocument> docs) org.apache.solr.client.solrj.response.UpdateResponseadd(Collection<org.apache.solr.common.SolrInputDocument> docs, int commitWithinMs) org.apache.solr.client.solrj.response.UpdateResponseorg.apache.solr.client.solrj.response.UpdateResponseadd(org.apache.solr.common.SolrInputDocument doc) org.apache.solr.client.solrj.response.UpdateResponseadd(org.apache.solr.common.SolrInputDocument doc, int commitWithinMs) org.apache.solr.client.solrj.response.UpdateResponseorg.apache.solr.client.solrj.response.UpdateResponseorg.apache.solr.client.solrj.response.UpdateResponseorg.apache.solr.client.solrj.response.UpdateResponseorg.apache.solr.client.solrj.response.UpdateResponseaddBeans(String collection, Collection<?> beans) org.apache.solr.client.solrj.response.UpdateResponseaddBeans(String collection, Collection<?> beans, int commitWithinMs) org.apache.solr.client.solrj.response.UpdateResponseorg.apache.solr.client.solrj.response.UpdateResponseaddBeans(Collection<?> beans) org.apache.solr.client.solrj.response.UpdateResponseaddBeans(Collection<?> beans, int commitWithinMs) org.apache.solr.client.solrj.response.UpdateResponseorg.apache.solr.client.solrj.response.UpdateResponsecommit()org.apache.solr.client.solrj.response.UpdateResponsecommit(boolean waitFlush, boolean waitSearcher) org.apache.solr.client.solrj.response.UpdateResponsecommit(boolean waitFlush, boolean waitSearcher, boolean softCommit) org.apache.solr.client.solrj.response.UpdateResponseorg.apache.solr.client.solrj.response.UpdateResponseorg.apache.solr.client.solrj.response.UpdateResponseorg.apache.solr.client.solrj.response.UpdateResponsedeleteById(String id) org.apache.solr.client.solrj.response.UpdateResponsedeleteById(String id, int commitWithinMs) org.apache.solr.client.solrj.response.UpdateResponsedeleteById(String collection, String id) org.apache.solr.client.solrj.response.UpdateResponsedeleteById(String collection, String id, int commitWithinMs) org.apache.solr.client.solrj.response.UpdateResponsedeleteById(String collection, List<String> ids) org.apache.solr.client.solrj.response.UpdateResponsedeleteById(String collection, List<String> ids, int commitWithinMs) org.apache.solr.client.solrj.response.UpdateResponsedeleteById(List<String> ids) org.apache.solr.client.solrj.response.UpdateResponsedeleteById(List<String> ids, int commitWithinMs) org.apache.solr.client.solrj.response.UpdateResponsedeleteByQuery(String query) org.apache.solr.client.solrj.response.UpdateResponsedeleteByQuery(String query, int commitWithinMs) org.apache.solr.client.solrj.response.UpdateResponsedeleteByQuery(String collection, String query) org.apache.solr.client.solrj.response.UpdateResponsedeleteByQuery(String collection, String query, int commitWithinMs) voidvoidonSuccess(org.apache.http.HttpResponse resp) org.apache.solr.client.solrj.response.UpdateResponseoptimize()org.apache.solr.client.solrj.response.UpdateResponseoptimize(boolean waitFlush, boolean waitSearcher) org.apache.solr.client.solrj.response.UpdateResponseoptimize(boolean waitFlush, boolean waitSearcher, int maxSegments) org.apache.solr.client.solrj.response.UpdateResponseorg.apache.solr.client.solrj.response.UpdateResponseorg.apache.solr.client.solrj.response.UpdateResponseorg.apache.solr.client.solrj.response.UpdateResponserollback()org.apache.solr.client.solrj.response.UpdateResponseMethods inherited from class org.apache.solr.client.solrj.impl.ConcurrentUpdateSolrClientblockUntilFinished, close, getQueryParams, request, setParser, setPollQueueTime, setQueryParams, setRequestWriter, shutdownNowMethods inherited from class org.apache.solr.client.solrj.SolrClientgetBinder, getById, getById, getById, getById, getById, getById, getById, getById, getContext, ping, ping, query, query, query, query, queryAndStreamResponse, queryAndStreamResponse, queryAndStreamResponse, request
- 
Constructor Details- 
AbstractAmetysConcurrentUpdateClientpublic AbstractAmetysConcurrentUpdateClient(String solrServerUrl, Optional<Integer> solrSocketTimeout, String collectionName, int queueSize, int threadCount, Logger logger) Constructor- Parameters:
- solrServerUrl- The Solr server URL
- solrSocketTimeout- 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 server
- threadCount- The number of background threads used to empty the queue
- logger- internal logger
 
 
- 
- 
Method Details- 
handleError- Overrides:
- handleErrorin class- org.apache.solr.client.solrj.impl.ConcurrentUpdateSolrClient
 
- 
onSuccess- Overrides:
- onSuccessin class- org.apache.solr.client.solrj.impl.ConcurrentUpdateSolrClient
 
- 
addpublic org.apache.solr.client.solrj.response.UpdateResponse add(String collection, Collection<org.apache.solr.common.SolrInputDocument> docs) throws org.apache.solr.client.solrj.SolrServerException, IOException - Overrides:
- addin class- org.apache.solr.client.solrj.SolrClient
- Throws:
- org.apache.solr.client.solrj.SolrServerException
- IOException
 
- 
addpublic org.apache.solr.client.solrj.response.UpdateResponse add(Collection<org.apache.solr.common.SolrInputDocument> docs) throws org.apache.solr.client.solrj.SolrServerException, IOException - Overrides:
- addin class- org.apache.solr.client.solrj.SolrClient
- Throws:
- org.apache.solr.client.solrj.SolrServerException
- IOException
 
- 
addpublic org.apache.solr.client.solrj.response.UpdateResponse add(String collection, Collection<org.apache.solr.common.SolrInputDocument> docs, int commitWithinMs) throws org.apache.solr.client.solrj.SolrServerException, IOException - Overrides:
- addin class- org.apache.solr.client.solrj.SolrClient
- Throws:
- org.apache.solr.client.solrj.SolrServerException
- IOException
 
- 
addpublic org.apache.solr.client.solrj.response.UpdateResponse add(Collection<org.apache.solr.common.SolrInputDocument> docs, int commitWithinMs) throws org.apache.solr.client.solrj.SolrServerException, IOException - Overrides:
- addin class- org.apache.solr.client.solrj.SolrClient
- Throws:
- org.apache.solr.client.solrj.SolrServerException
- IOException
 
- 
addpublic org.apache.solr.client.solrj.response.UpdateResponse add(String collection, org.apache.solr.common.SolrInputDocument doc) throws org.apache.solr.client.solrj.SolrServerException, IOException - Overrides:
- addin class- org.apache.solr.client.solrj.SolrClient
- Throws:
- org.apache.solr.client.solrj.SolrServerException
- IOException
 
- 
addpublic org.apache.solr.client.solrj.response.UpdateResponse add(org.apache.solr.common.SolrInputDocument doc) throws org.apache.solr.client.solrj.SolrServerException, IOException - Overrides:
- addin class- org.apache.solr.client.solrj.SolrClient
- Throws:
- org.apache.solr.client.solrj.SolrServerException
- IOException
 
- 
addpublic org.apache.solr.client.solrj.response.UpdateResponse add(String collection, org.apache.solr.common.SolrInputDocument doc, int commitWithinMs) throws org.apache.solr.client.solrj.SolrServerException, IOException - Overrides:
- addin class- org.apache.solr.client.solrj.SolrClient
- Throws:
- org.apache.solr.client.solrj.SolrServerException
- IOException
 
- 
addpublic org.apache.solr.client.solrj.response.UpdateResponse add(org.apache.solr.common.SolrInputDocument doc, int commitWithinMs) throws org.apache.solr.client.solrj.SolrServerException, IOException - Overrides:
- addin class- org.apache.solr.client.solrj.SolrClient
- Throws:
- org.apache.solr.client.solrj.SolrServerException
- IOException
 
- 
addpublic org.apache.solr.client.solrj.response.UpdateResponse add(String collection, Iterator<org.apache.solr.common.SolrInputDocument> docIterator) throws org.apache.solr.client.solrj.SolrServerException, IOException - Overrides:
- addin class- org.apache.solr.client.solrj.SolrClient
- Throws:
- org.apache.solr.client.solrj.SolrServerException
- IOException
 
- 
addpublic org.apache.solr.client.solrj.response.UpdateResponse add(Iterator<org.apache.solr.common.SolrInputDocument> docIterator) throws org.apache.solr.client.solrj.SolrServerException, IOException - Overrides:
- addin class- org.apache.solr.client.solrj.SolrClient
- Throws:
- org.apache.solr.client.solrj.SolrServerException
- IOException
 
- 
addBeanpublic org.apache.solr.client.solrj.response.UpdateResponse addBean(String collection, Object obj) throws IOException, org.apache.solr.client.solrj.SolrServerException - Overrides:
- addBeanin class- org.apache.solr.client.solrj.SolrClient
- Throws:
- IOException
- org.apache.solr.client.solrj.SolrServerException
 
- 
addBeanpublic org.apache.solr.client.solrj.response.UpdateResponse addBean(Object obj) throws IOException, org.apache.solr.client.solrj.SolrServerException - Overrides:
- addBeanin class- org.apache.solr.client.solrj.SolrClient
- Throws:
- IOException
- org.apache.solr.client.solrj.SolrServerException
 
- 
addBeanpublic org.apache.solr.client.solrj.response.UpdateResponse addBean(String collection, Object obj, int commitWithinMs) throws IOException, org.apache.solr.client.solrj.SolrServerException - Overrides:
- addBeanin class- org.apache.solr.client.solrj.SolrClient
- Throws:
- IOException
- org.apache.solr.client.solrj.SolrServerException
 
- 
addBeanpublic org.apache.solr.client.solrj.response.UpdateResponse addBean(Object obj, int commitWithinMs) throws IOException, org.apache.solr.client.solrj.SolrServerException - Overrides:
- addBeanin class- org.apache.solr.client.solrj.SolrClient
- Throws:
- IOException
- org.apache.solr.client.solrj.SolrServerException
 
- 
addBeanspublic org.apache.solr.client.solrj.response.UpdateResponse addBeans(String collection, Collection<?> beans) throws org.apache.solr.client.solrj.SolrServerException, IOException - Overrides:
- addBeansin class- org.apache.solr.client.solrj.SolrClient
- Throws:
- org.apache.solr.client.solrj.SolrServerException
- IOException
 
- 
addBeanspublic org.apache.solr.client.solrj.response.UpdateResponse addBeans(Collection<?> beans) throws org.apache.solr.client.solrj.SolrServerException, IOException - Overrides:
- addBeansin class- org.apache.solr.client.solrj.SolrClient
- Throws:
- org.apache.solr.client.solrj.SolrServerException
- IOException
 
- 
addBeanspublic org.apache.solr.client.solrj.response.UpdateResponse addBeans(String collection, Collection<?> beans, int commitWithinMs) throws org.apache.solr.client.solrj.SolrServerException, IOException - Overrides:
- addBeansin class- org.apache.solr.client.solrj.SolrClient
- Throws:
- org.apache.solr.client.solrj.SolrServerException
- IOException
 
- 
addBeanspublic org.apache.solr.client.solrj.response.UpdateResponse addBeans(Collection<?> beans, int commitWithinMs) throws org.apache.solr.client.solrj.SolrServerException, IOException - Overrides:
- addBeansin class- org.apache.solr.client.solrj.SolrClient
- Throws:
- org.apache.solr.client.solrj.SolrServerException
- IOException
 
- 
addBeanspublic org.apache.solr.client.solrj.response.UpdateResponse addBeans(String collection, Iterator<?> beanIterator) throws org.apache.solr.client.solrj.SolrServerException, IOException - Overrides:
- addBeansin class- org.apache.solr.client.solrj.SolrClient
- Throws:
- org.apache.solr.client.solrj.SolrServerException
- IOException
 
- 
addBeanspublic org.apache.solr.client.solrj.response.UpdateResponse addBeans(Iterator<?> beanIterator) throws org.apache.solr.client.solrj.SolrServerException, IOException - Overrides:
- addBeansin class- org.apache.solr.client.solrj.SolrClient
- Throws:
- org.apache.solr.client.solrj.SolrServerException
- IOException
 
- 
commitpublic org.apache.solr.client.solrj.response.UpdateResponse commit(String collection) throws org.apache.solr.client.solrj.SolrServerException, IOException - Overrides:
- commitin class- org.apache.solr.client.solrj.SolrClient
- Throws:
- org.apache.solr.client.solrj.SolrServerException
- IOException
 
- 
commitpublic org.apache.solr.client.solrj.response.UpdateResponse commit() throws org.apache.solr.client.solrj.SolrServerException, IOException- Overrides:
- commitin class- org.apache.solr.client.solrj.SolrClient
- Throws:
- org.apache.solr.client.solrj.SolrServerException
- IOException
 
- 
commitpublic org.apache.solr.client.solrj.response.UpdateResponse commit(String collection, boolean waitFlush, boolean waitSearcher) throws org.apache.solr.client.solrj.SolrServerException, IOException - Overrides:
- commitin class- org.apache.solr.client.solrj.SolrClient
- Throws:
- org.apache.solr.client.solrj.SolrServerException
- IOException
 
- 
commitpublic org.apache.solr.client.solrj.response.UpdateResponse commit(boolean waitFlush, boolean waitSearcher) throws org.apache.solr.client.solrj.SolrServerException, IOException - Overrides:
- commitin class- org.apache.solr.client.solrj.SolrClient
- Throws:
- org.apache.solr.client.solrj.SolrServerException
- IOException
 
- 
commitpublic org.apache.solr.client.solrj.response.UpdateResponse commit(String collection, boolean waitFlush, boolean waitSearcher, boolean softCommit) throws org.apache.solr.client.solrj.SolrServerException, IOException - Overrides:
- commitin class- org.apache.solr.client.solrj.SolrClient
- Throws:
- org.apache.solr.client.solrj.SolrServerException
- IOException
 
- 
commitpublic org.apache.solr.client.solrj.response.UpdateResponse commit(boolean waitFlush, boolean waitSearcher, boolean softCommit) throws org.apache.solr.client.solrj.SolrServerException, IOException - Overrides:
- commitin class- org.apache.solr.client.solrj.SolrClient
- Throws:
- org.apache.solr.client.solrj.SolrServerException
- IOException
 
- 
optimizepublic org.apache.solr.client.solrj.response.UpdateResponse optimize(String collection) throws org.apache.solr.client.solrj.SolrServerException, IOException - Overrides:
- optimizein class- org.apache.solr.client.solrj.SolrClient
- Throws:
- org.apache.solr.client.solrj.SolrServerException
- IOException
 
- 
optimizepublic org.apache.solr.client.solrj.response.UpdateResponse optimize() throws org.apache.solr.client.solrj.SolrServerException, IOException- Overrides:
- optimizein class- org.apache.solr.client.solrj.SolrClient
- Throws:
- org.apache.solr.client.solrj.SolrServerException
- IOException
 
- 
optimizepublic org.apache.solr.client.solrj.response.UpdateResponse optimize(String collection, boolean waitFlush, boolean waitSearcher) throws org.apache.solr.client.solrj.SolrServerException, IOException - Overrides:
- optimizein class- org.apache.solr.client.solrj.SolrClient
- Throws:
- org.apache.solr.client.solrj.SolrServerException
- IOException
 
- 
optimizepublic org.apache.solr.client.solrj.response.UpdateResponse optimize(boolean waitFlush, boolean waitSearcher) throws org.apache.solr.client.solrj.SolrServerException, IOException - Overrides:
- optimizein class- org.apache.solr.client.solrj.SolrClient
- Throws:
- org.apache.solr.client.solrj.SolrServerException
- IOException
 
- 
optimizepublic org.apache.solr.client.solrj.response.UpdateResponse optimize(String collection, boolean waitFlush, boolean waitSearcher, int maxSegments) throws org.apache.solr.client.solrj.SolrServerException, IOException - Overrides:
- optimizein class- org.apache.solr.client.solrj.SolrClient
- Throws:
- org.apache.solr.client.solrj.SolrServerException
- IOException
 
- 
optimizepublic org.apache.solr.client.solrj.response.UpdateResponse optimize(boolean waitFlush, boolean waitSearcher, int maxSegments) throws org.apache.solr.client.solrj.SolrServerException, IOException - Overrides:
- optimizein class- org.apache.solr.client.solrj.SolrClient
- Throws:
- org.apache.solr.client.solrj.SolrServerException
- IOException
 
- 
rollbackpublic org.apache.solr.client.solrj.response.UpdateResponse rollback(String collection) throws org.apache.solr.client.solrj.SolrServerException, IOException - Overrides:
- rollbackin class- org.apache.solr.client.solrj.SolrClient
- Throws:
- org.apache.solr.client.solrj.SolrServerException
- IOException
 
- 
rollbackpublic org.apache.solr.client.solrj.response.UpdateResponse rollback() throws org.apache.solr.client.solrj.SolrServerException, IOException- Overrides:
- rollbackin class- org.apache.solr.client.solrj.SolrClient
- Throws:
- org.apache.solr.client.solrj.SolrServerException
- IOException
 
- 
deleteByIdpublic org.apache.solr.client.solrj.response.UpdateResponse deleteById(String collection, String id) throws org.apache.solr.client.solrj.SolrServerException, IOException - Overrides:
- deleteByIdin class- org.apache.solr.client.solrj.SolrClient
- Throws:
- org.apache.solr.client.solrj.SolrServerException
- IOException
 
- 
deleteByIdpublic org.apache.solr.client.solrj.response.UpdateResponse deleteById(String id) throws org.apache.solr.client.solrj.SolrServerException, IOException - Overrides:
- deleteByIdin class- org.apache.solr.client.solrj.SolrClient
- Throws:
- org.apache.solr.client.solrj.SolrServerException
- IOException
 
- 
deleteByIdpublic org.apache.solr.client.solrj.response.UpdateResponse deleteById(String collection, String id, int commitWithinMs) throws org.apache.solr.client.solrj.SolrServerException, IOException - Overrides:
- deleteByIdin class- org.apache.solr.client.solrj.SolrClient
- Throws:
- org.apache.solr.client.solrj.SolrServerException
- IOException
 
- 
deleteByIdpublic org.apache.solr.client.solrj.response.UpdateResponse deleteById(String id, int commitWithinMs) throws org.apache.solr.client.solrj.SolrServerException, IOException - Overrides:
- deleteByIdin class- org.apache.solr.client.solrj.SolrClient
- Throws:
- org.apache.solr.client.solrj.SolrServerException
- IOException
 
- 
deleteByIdpublic org.apache.solr.client.solrj.response.UpdateResponse deleteById(String collection, List<String> ids) throws org.apache.solr.client.solrj.SolrServerException, IOException - Overrides:
- deleteByIdin class- org.apache.solr.client.solrj.SolrClient
- Throws:
- org.apache.solr.client.solrj.SolrServerException
- IOException
 
- 
deleteByIdpublic org.apache.solr.client.solrj.response.UpdateResponse deleteById(List<String> ids) throws org.apache.solr.client.solrj.SolrServerException, IOException - Overrides:
- deleteByIdin class- org.apache.solr.client.solrj.SolrClient
- Throws:
- org.apache.solr.client.solrj.SolrServerException
- IOException
 
- 
deleteByIdpublic org.apache.solr.client.solrj.response.UpdateResponse deleteById(String collection, List<String> ids, int commitWithinMs) throws org.apache.solr.client.solrj.SolrServerException, IOException - Overrides:
- deleteByIdin class- org.apache.solr.client.solrj.SolrClient
- Throws:
- org.apache.solr.client.solrj.SolrServerException
- IOException
 
- 
deleteByIdpublic org.apache.solr.client.solrj.response.UpdateResponse deleteById(List<String> ids, int commitWithinMs) throws org.apache.solr.client.solrj.SolrServerException, IOException - Overrides:
- deleteByIdin class- org.apache.solr.client.solrj.SolrClient
- Throws:
- org.apache.solr.client.solrj.SolrServerException
- IOException
 
- 
deleteByQuerypublic org.apache.solr.client.solrj.response.UpdateResponse deleteByQuery(String collection, String query) throws org.apache.solr.client.solrj.SolrServerException, IOException - Overrides:
- deleteByQueryin class- org.apache.solr.client.solrj.SolrClient
- Throws:
- org.apache.solr.client.solrj.SolrServerException
- IOException
 
- 
deleteByQuerypublic org.apache.solr.client.solrj.response.UpdateResponse deleteByQuery(String query) throws org.apache.solr.client.solrj.SolrServerException, IOException - Overrides:
- deleteByQueryin class- org.apache.solr.client.solrj.SolrClient
- Throws:
- org.apache.solr.client.solrj.SolrServerException
- IOException
 
- 
deleteByQuerypublic org.apache.solr.client.solrj.response.UpdateResponse deleteByQuery(String collection, String query, int commitWithinMs) throws org.apache.solr.client.solrj.SolrServerException, IOException - Overrides:
- deleteByQueryin class- org.apache.solr.client.solrj.SolrClient
- Throws:
- org.apache.solr.client.solrj.SolrServerException
- IOException
 
- 
deleteByQuerypublic org.apache.solr.client.solrj.response.UpdateResponse deleteByQuery(String query, int commitWithinMs) throws org.apache.solr.client.solrj.SolrServerException, IOException - Overrides:
- deleteByQueryin class- org.apache.solr.client.solrj.SolrClient
- Throws:
- org.apache.solr.client.solrj.SolrServerException
- IOException
 
 
-