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
See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.apache.solr.client.solrj.impl.ConcurrentUpdateSolrClient

    org.apache.solr.client.solrj.impl.ConcurrentUpdateSolrClient.Builder
  • Constructor Summary

    Constructors
    Constructor
    Description
    AbstractAmetysConcurrentUpdateClient(String solrServerUrl, Optional<Integer> solrSocketTimeout, String collectionName, int queueSize, int threadCount, Logger logger)
    Constructor
  • Method Summary

    Modifier and Type
    Method
    Description
    org.apache.solr.client.solrj.response.UpdateResponse
    add(String collection, Collection<org.apache.solr.common.SolrInputDocument> docs)
     
    org.apache.solr.client.solrj.response.UpdateResponse
    add(String collection, Collection<org.apache.solr.common.SolrInputDocument> docs, int commitWithinMs)
     
    org.apache.solr.client.solrj.response.UpdateResponse
    add(String collection, Iterator<org.apache.solr.common.SolrInputDocument> docIterator)
     
    org.apache.solr.client.solrj.response.UpdateResponse
    add(String collection, org.apache.solr.common.SolrInputDocument doc)
     
    org.apache.solr.client.solrj.response.UpdateResponse
    add(String collection, org.apache.solr.common.SolrInputDocument doc, int commitWithinMs)
     
    org.apache.solr.client.solrj.response.UpdateResponse
    add(Collection<org.apache.solr.common.SolrInputDocument> docs)
     
    org.apache.solr.client.solrj.response.UpdateResponse
    add(Collection<org.apache.solr.common.SolrInputDocument> docs, int commitWithinMs)
     
    org.apache.solr.client.solrj.response.UpdateResponse
    add(Iterator<org.apache.solr.common.SolrInputDocument> docIterator)
     
    org.apache.solr.client.solrj.response.UpdateResponse
    add(org.apache.solr.common.SolrInputDocument doc)
     
    org.apache.solr.client.solrj.response.UpdateResponse
    add(org.apache.solr.common.SolrInputDocument doc, int commitWithinMs)
     
    org.apache.solr.client.solrj.response.UpdateResponse
     
    org.apache.solr.client.solrj.response.UpdateResponse
    addBean(Object obj, int commitWithinMs)
     
    org.apache.solr.client.solrj.response.UpdateResponse
    addBean(String collection, Object obj)
     
    org.apache.solr.client.solrj.response.UpdateResponse
    addBean(String collection, Object obj, int commitWithinMs)
     
    org.apache.solr.client.solrj.response.UpdateResponse
    addBeans(String collection, Collection<?> beans)
     
    org.apache.solr.client.solrj.response.UpdateResponse
    addBeans(String collection, Collection<?> beans, int commitWithinMs)
     
    org.apache.solr.client.solrj.response.UpdateResponse
    addBeans(String collection, Iterator<?> beanIterator)
     
    org.apache.solr.client.solrj.response.UpdateResponse
    addBeans(Collection<?> beans)
     
    org.apache.solr.client.solrj.response.UpdateResponse
    addBeans(Collection<?> beans, int commitWithinMs)
     
    org.apache.solr.client.solrj.response.UpdateResponse
    addBeans(Iterator<?> beanIterator)
     
    org.apache.solr.client.solrj.response.UpdateResponse
     
    org.apache.solr.client.solrj.response.UpdateResponse
    commit(boolean waitFlush, boolean waitSearcher)
     
    org.apache.solr.client.solrj.response.UpdateResponse
    commit(boolean waitFlush, boolean waitSearcher, boolean softCommit)
     
    org.apache.solr.client.solrj.response.UpdateResponse
    commit(String collection)
     
    org.apache.solr.client.solrj.response.UpdateResponse
    commit(String collection, boolean waitFlush, boolean waitSearcher)
     
    org.apache.solr.client.solrj.response.UpdateResponse
    commit(String collection, boolean waitFlush, boolean waitSearcher, boolean softCommit)
     
    org.apache.solr.client.solrj.response.UpdateResponse
     
    org.apache.solr.client.solrj.response.UpdateResponse
    deleteById(String id, int commitWithinMs)
     
    org.apache.solr.client.solrj.response.UpdateResponse
    deleteById(String collection, String id)
     
    org.apache.solr.client.solrj.response.UpdateResponse
    deleteById(String collection, String id, int commitWithinMs)
     
    org.apache.solr.client.solrj.response.UpdateResponse
    deleteById(String collection, List<String> ids)
     
    org.apache.solr.client.solrj.response.UpdateResponse
    deleteById(String collection, List<String> ids, int commitWithinMs)
     
    org.apache.solr.client.solrj.response.UpdateResponse
     
    org.apache.solr.client.solrj.response.UpdateResponse
    deleteById(List<String> ids, int commitWithinMs)
     
    org.apache.solr.client.solrj.response.UpdateResponse
     
    org.apache.solr.client.solrj.response.UpdateResponse
    deleteByQuery(String query, int commitWithinMs)
     
    org.apache.solr.client.solrj.response.UpdateResponse
    deleteByQuery(String collection, String query)
     
    org.apache.solr.client.solrj.response.UpdateResponse
    deleteByQuery(String collection, String query, int commitWithinMs)
     
    void
     
    void
    onSuccess(org.apache.http.HttpResponse resp)
     
    org.apache.solr.client.solrj.response.UpdateResponse
     
    org.apache.solr.client.solrj.response.UpdateResponse
    optimize(boolean waitFlush, boolean waitSearcher)
     
    org.apache.solr.client.solrj.response.UpdateResponse
    optimize(boolean waitFlush, boolean waitSearcher, int maxSegments)
     
    org.apache.solr.client.solrj.response.UpdateResponse
    optimize(String collection)
     
    org.apache.solr.client.solrj.response.UpdateResponse
    optimize(String collection, boolean waitFlush, boolean waitSearcher)
     
    org.apache.solr.client.solrj.response.UpdateResponse
    optimize(String collection, boolean waitFlush, boolean waitSearcher, int maxSegments)
     
    org.apache.solr.client.solrj.response.UpdateResponse
     
    org.apache.solr.client.solrj.response.UpdateResponse
    rollback(String collection)
     

    Methods inherited from class org.apache.solr.client.solrj.impl.ConcurrentUpdateSolrClient

    blockUntilFinished, close, getQueryParams, request, setParser, setPollQueueTime, setQueryParams, setRequestWriter, shutdownNow

    Methods inherited from class org.apache.solr.client.solrj.SolrClient

    getBinder, getById, getById, getById, getById, getById, getById, getById, getById, getContext, ping, ping, query, query, query, query, queryAndStreamResponse, queryAndStreamResponse, queryAndStreamResponse, request

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • AbstractAmetysConcurrentUpdateClient

      public 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

      public void handleError(Throwable t)
      Overrides:
      handleError in class org.apache.solr.client.solrj.impl.ConcurrentUpdateSolrClient
    • onSuccess

      public void onSuccess(org.apache.http.HttpResponse resp)
      Overrides:
      onSuccess in class org.apache.solr.client.solrj.impl.ConcurrentUpdateSolrClient
    • add

      public 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:
      add in class org.apache.solr.client.solrj.SolrClient
      Throws:
      org.apache.solr.client.solrj.SolrServerException
      IOException
    • add

      public org.apache.solr.client.solrj.response.UpdateResponse add(Collection<org.apache.solr.common.SolrInputDocument> docs) throws org.apache.solr.client.solrj.SolrServerException, IOException
      Overrides:
      add in class org.apache.solr.client.solrj.SolrClient
      Throws:
      org.apache.solr.client.solrj.SolrServerException
      IOException
    • add

      public 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:
      add in class org.apache.solr.client.solrj.SolrClient
      Throws:
      org.apache.solr.client.solrj.SolrServerException
      IOException
    • add

      public 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:
      add in class org.apache.solr.client.solrj.SolrClient
      Throws:
      org.apache.solr.client.solrj.SolrServerException
      IOException
    • add

      public 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:
      add in class org.apache.solr.client.solrj.SolrClient
      Throws:
      org.apache.solr.client.solrj.SolrServerException
      IOException
    • add

      public org.apache.solr.client.solrj.response.UpdateResponse add(org.apache.solr.common.SolrInputDocument doc) throws org.apache.solr.client.solrj.SolrServerException, IOException
      Overrides:
      add in class org.apache.solr.client.solrj.SolrClient
      Throws:
      org.apache.solr.client.solrj.SolrServerException
      IOException
    • add

      public 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:
      add in class org.apache.solr.client.solrj.SolrClient
      Throws:
      org.apache.solr.client.solrj.SolrServerException
      IOException
    • add

      public 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:
      add in class org.apache.solr.client.solrj.SolrClient
      Throws:
      org.apache.solr.client.solrj.SolrServerException
      IOException
    • add

      public 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:
      add in class org.apache.solr.client.solrj.SolrClient
      Throws:
      org.apache.solr.client.solrj.SolrServerException
      IOException
    • add

      public org.apache.solr.client.solrj.response.UpdateResponse add(Iterator<org.apache.solr.common.SolrInputDocument> docIterator) throws org.apache.solr.client.solrj.SolrServerException, IOException
      Overrides:
      add in class org.apache.solr.client.solrj.SolrClient
      Throws:
      org.apache.solr.client.solrj.SolrServerException
      IOException
    • addBean

      public org.apache.solr.client.solrj.response.UpdateResponse addBean(String collection, Object obj) throws IOException, org.apache.solr.client.solrj.SolrServerException
      Overrides:
      addBean in class org.apache.solr.client.solrj.SolrClient
      Throws:
      IOException
      org.apache.solr.client.solrj.SolrServerException
    • addBean

      public org.apache.solr.client.solrj.response.UpdateResponse addBean(Object obj) throws IOException, org.apache.solr.client.solrj.SolrServerException
      Overrides:
      addBean in class org.apache.solr.client.solrj.SolrClient
      Throws:
      IOException
      org.apache.solr.client.solrj.SolrServerException
    • addBean

      public org.apache.solr.client.solrj.response.UpdateResponse addBean(String collection, Object obj, int commitWithinMs) throws IOException, org.apache.solr.client.solrj.SolrServerException
      Overrides:
      addBean in class org.apache.solr.client.solrj.SolrClient
      Throws:
      IOException
      org.apache.solr.client.solrj.SolrServerException
    • addBean

      public org.apache.solr.client.solrj.response.UpdateResponse addBean(Object obj, int commitWithinMs) throws IOException, org.apache.solr.client.solrj.SolrServerException
      Overrides:
      addBean in class org.apache.solr.client.solrj.SolrClient
      Throws:
      IOException
      org.apache.solr.client.solrj.SolrServerException
    • addBeans

      public org.apache.solr.client.solrj.response.UpdateResponse addBeans(String collection, Collection<?> beans) throws org.apache.solr.client.solrj.SolrServerException, IOException
      Overrides:
      addBeans in class org.apache.solr.client.solrj.SolrClient
      Throws:
      org.apache.solr.client.solrj.SolrServerException
      IOException
    • addBeans

      public org.apache.solr.client.solrj.response.UpdateResponse addBeans(Collection<?> beans) throws org.apache.solr.client.solrj.SolrServerException, IOException
      Overrides:
      addBeans in class org.apache.solr.client.solrj.SolrClient
      Throws:
      org.apache.solr.client.solrj.SolrServerException
      IOException
    • addBeans

      public org.apache.solr.client.solrj.response.UpdateResponse addBeans(String collection, Collection<?> beans, int commitWithinMs) throws org.apache.solr.client.solrj.SolrServerException, IOException
      Overrides:
      addBeans in class org.apache.solr.client.solrj.SolrClient
      Throws:
      org.apache.solr.client.solrj.SolrServerException
      IOException
    • addBeans

      public org.apache.solr.client.solrj.response.UpdateResponse addBeans(Collection<?> beans, int commitWithinMs) throws org.apache.solr.client.solrj.SolrServerException, IOException
      Overrides:
      addBeans in class org.apache.solr.client.solrj.SolrClient
      Throws:
      org.apache.solr.client.solrj.SolrServerException
      IOException
    • addBeans

      public org.apache.solr.client.solrj.response.UpdateResponse addBeans(String collection, Iterator<?> beanIterator) throws org.apache.solr.client.solrj.SolrServerException, IOException
      Overrides:
      addBeans in class org.apache.solr.client.solrj.SolrClient
      Throws:
      org.apache.solr.client.solrj.SolrServerException
      IOException
    • addBeans

      public org.apache.solr.client.solrj.response.UpdateResponse addBeans(Iterator<?> beanIterator) throws org.apache.solr.client.solrj.SolrServerException, IOException
      Overrides:
      addBeans in class org.apache.solr.client.solrj.SolrClient
      Throws:
      org.apache.solr.client.solrj.SolrServerException
      IOException
    • commit

      public org.apache.solr.client.solrj.response.UpdateResponse commit(String collection) throws org.apache.solr.client.solrj.SolrServerException, IOException
      Overrides:
      commit in class org.apache.solr.client.solrj.SolrClient
      Throws:
      org.apache.solr.client.solrj.SolrServerException
      IOException
    • commit

      public org.apache.solr.client.solrj.response.UpdateResponse commit() throws org.apache.solr.client.solrj.SolrServerException, IOException
      Overrides:
      commit in class org.apache.solr.client.solrj.SolrClient
      Throws:
      org.apache.solr.client.solrj.SolrServerException
      IOException
    • commit

      public org.apache.solr.client.solrj.response.UpdateResponse commit(String collection, boolean waitFlush, boolean waitSearcher) throws org.apache.solr.client.solrj.SolrServerException, IOException
      Overrides:
      commit in class org.apache.solr.client.solrj.SolrClient
      Throws:
      org.apache.solr.client.solrj.SolrServerException
      IOException
    • commit

      public org.apache.solr.client.solrj.response.UpdateResponse commit(boolean waitFlush, boolean waitSearcher) throws org.apache.solr.client.solrj.SolrServerException, IOException
      Overrides:
      commit in class org.apache.solr.client.solrj.SolrClient
      Throws:
      org.apache.solr.client.solrj.SolrServerException
      IOException
    • commit

      public 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:
      commit in class org.apache.solr.client.solrj.SolrClient
      Throws:
      org.apache.solr.client.solrj.SolrServerException
      IOException
    • commit

      public org.apache.solr.client.solrj.response.UpdateResponse commit(boolean waitFlush, boolean waitSearcher, boolean softCommit) throws org.apache.solr.client.solrj.SolrServerException, IOException
      Overrides:
      commit in class org.apache.solr.client.solrj.SolrClient
      Throws:
      org.apache.solr.client.solrj.SolrServerException
      IOException
    • optimize

      public org.apache.solr.client.solrj.response.UpdateResponse optimize(String collection) throws org.apache.solr.client.solrj.SolrServerException, IOException
      Overrides:
      optimize in class org.apache.solr.client.solrj.SolrClient
      Throws:
      org.apache.solr.client.solrj.SolrServerException
      IOException
    • optimize

      public org.apache.solr.client.solrj.response.UpdateResponse optimize() throws org.apache.solr.client.solrj.SolrServerException, IOException
      Overrides:
      optimize in class org.apache.solr.client.solrj.SolrClient
      Throws:
      org.apache.solr.client.solrj.SolrServerException
      IOException
    • optimize

      public org.apache.solr.client.solrj.response.UpdateResponse optimize(String collection, boolean waitFlush, boolean waitSearcher) throws org.apache.solr.client.solrj.SolrServerException, IOException
      Overrides:
      optimize in class org.apache.solr.client.solrj.SolrClient
      Throws:
      org.apache.solr.client.solrj.SolrServerException
      IOException
    • optimize

      public org.apache.solr.client.solrj.response.UpdateResponse optimize(boolean waitFlush, boolean waitSearcher) throws org.apache.solr.client.solrj.SolrServerException, IOException
      Overrides:
      optimize in class org.apache.solr.client.solrj.SolrClient
      Throws:
      org.apache.solr.client.solrj.SolrServerException
      IOException
    • optimize

      public 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:
      optimize in class org.apache.solr.client.solrj.SolrClient
      Throws:
      org.apache.solr.client.solrj.SolrServerException
      IOException
    • optimize

      public org.apache.solr.client.solrj.response.UpdateResponse optimize(boolean waitFlush, boolean waitSearcher, int maxSegments) throws org.apache.solr.client.solrj.SolrServerException, IOException
      Overrides:
      optimize in class org.apache.solr.client.solrj.SolrClient
      Throws:
      org.apache.solr.client.solrj.SolrServerException
      IOException
    • rollback

      public org.apache.solr.client.solrj.response.UpdateResponse rollback(String collection) throws org.apache.solr.client.solrj.SolrServerException, IOException
      Overrides:
      rollback in class org.apache.solr.client.solrj.SolrClient
      Throws:
      org.apache.solr.client.solrj.SolrServerException
      IOException
    • rollback

      public org.apache.solr.client.solrj.response.UpdateResponse rollback() throws org.apache.solr.client.solrj.SolrServerException, IOException
      Overrides:
      rollback in class org.apache.solr.client.solrj.SolrClient
      Throws:
      org.apache.solr.client.solrj.SolrServerException
      IOException
    • deleteById

      public org.apache.solr.client.solrj.response.UpdateResponse deleteById(String collection, String id) throws org.apache.solr.client.solrj.SolrServerException, IOException
      Overrides:
      deleteById in class org.apache.solr.client.solrj.SolrClient
      Throws:
      org.apache.solr.client.solrj.SolrServerException
      IOException
    • deleteById

      public org.apache.solr.client.solrj.response.UpdateResponse deleteById(String id) throws org.apache.solr.client.solrj.SolrServerException, IOException
      Overrides:
      deleteById in class org.apache.solr.client.solrj.SolrClient
      Throws:
      org.apache.solr.client.solrj.SolrServerException
      IOException
    • deleteById

      public org.apache.solr.client.solrj.response.UpdateResponse deleteById(String collection, String id, int commitWithinMs) throws org.apache.solr.client.solrj.SolrServerException, IOException
      Overrides:
      deleteById in class org.apache.solr.client.solrj.SolrClient
      Throws:
      org.apache.solr.client.solrj.SolrServerException
      IOException
    • deleteById

      public org.apache.solr.client.solrj.response.UpdateResponse deleteById(String id, int commitWithinMs) throws org.apache.solr.client.solrj.SolrServerException, IOException
      Overrides:
      deleteById in class org.apache.solr.client.solrj.SolrClient
      Throws:
      org.apache.solr.client.solrj.SolrServerException
      IOException
    • deleteById

      public org.apache.solr.client.solrj.response.UpdateResponse deleteById(String collection, List<String> ids) throws org.apache.solr.client.solrj.SolrServerException, IOException
      Overrides:
      deleteById in class org.apache.solr.client.solrj.SolrClient
      Throws:
      org.apache.solr.client.solrj.SolrServerException
      IOException
    • deleteById

      public org.apache.solr.client.solrj.response.UpdateResponse deleteById(List<String> ids) throws org.apache.solr.client.solrj.SolrServerException, IOException
      Overrides:
      deleteById in class org.apache.solr.client.solrj.SolrClient
      Throws:
      org.apache.solr.client.solrj.SolrServerException
      IOException
    • deleteById

      public org.apache.solr.client.solrj.response.UpdateResponse deleteById(String collection, List<String> ids, int commitWithinMs) throws org.apache.solr.client.solrj.SolrServerException, IOException
      Overrides:
      deleteById in class org.apache.solr.client.solrj.SolrClient
      Throws:
      org.apache.solr.client.solrj.SolrServerException
      IOException
    • deleteById

      public org.apache.solr.client.solrj.response.UpdateResponse deleteById(List<String> ids, int commitWithinMs) throws org.apache.solr.client.solrj.SolrServerException, IOException
      Overrides:
      deleteById in class org.apache.solr.client.solrj.SolrClient
      Throws:
      org.apache.solr.client.solrj.SolrServerException
      IOException
    • deleteByQuery

      public org.apache.solr.client.solrj.response.UpdateResponse deleteByQuery(String collection, String query) throws org.apache.solr.client.solrj.SolrServerException, IOException
      Overrides:
      deleteByQuery in class org.apache.solr.client.solrj.SolrClient
      Throws:
      org.apache.solr.client.solrj.SolrServerException
      IOException
    • deleteByQuery

      public org.apache.solr.client.solrj.response.UpdateResponse deleteByQuery(String query) throws org.apache.solr.client.solrj.SolrServerException, IOException
      Overrides:
      deleteByQuery in class org.apache.solr.client.solrj.SolrClient
      Throws:
      org.apache.solr.client.solrj.SolrServerException
      IOException
    • deleteByQuery

      public org.apache.solr.client.solrj.response.UpdateResponse deleteByQuery(String collection, String query, int commitWithinMs) throws org.apache.solr.client.solrj.SolrServerException, IOException
      Overrides:
      deleteByQuery in class org.apache.solr.client.solrj.SolrClient
      Throws:
      org.apache.solr.client.solrj.SolrServerException
      IOException
    • deleteByQuery

      public org.apache.solr.client.solrj.response.UpdateResponse deleteByQuery(String query, int commitWithinMs) throws org.apache.solr.client.solrj.SolrServerException, IOException
      Overrides:
      deleteByQuery in class org.apache.solr.client.solrj.SolrClient
      Throws:
      org.apache.solr.client.solrj.SolrServerException
      IOException