Class SolrClusterComponent.OverrideCollectionSolrClient

java.lang.Object
org.apache.solr.client.solrj.SolrClient
com.lucidworks.cloud.api.solr.SolrClusterComponent.OverrideCollectionSolrClient
All Implemented Interfaces:
Closeable, Serializable, AutoCloseable
Enclosing class:
SolrClusterComponent

public static class SolrClusterComponent.OverrideCollectionSolrClient extends org.apache.solr.client.solrj.SolrClient
Class to remember the requested collection. Solr Client has a possibility to set a default collection, which will be used with methods who doesn't take a collection param. We cannot use that because of client is used in multithreaded manner.
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    OverrideCollectionSolrClient(org.apache.solr.client.solrj.impl.CloudSolrClient delegate, String collectionId)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    org.apache.solr.client.solrj.impl.CloudSolrClient
     
    org.apache.solr.common.util.NamedList<Object>
    request(org.apache.solr.client.solrj.SolrRequest request, String collection)
     

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

    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, getBinder, getById, getById, getById, getById, getById, getById, getById, getById, getContext, optimize, optimize, optimize, optimize, optimize, optimize, ping, ping, query, query, query, query, queryAndStreamResponse, queryAndStreamResponse, queryAndStreamResponse, request, rollback, rollback

    Methods inherited from class java.lang.Object

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

    • OverrideCollectionSolrClient

      public OverrideCollectionSolrClient(org.apache.solr.client.solrj.impl.CloudSolrClient delegate, String collectionId)
  • Method Details

    • 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
      Specified by:
      request in class org.apache.solr.client.solrj.SolrClient
      Throws:
      org.apache.solr.client.solrj.SolrServerException
      IOException
    • getSolrClient

      public org.apache.solr.client.solrj.impl.CloudSolrClient getSolrClient()
    • close

      public void close()