Class SolrClusterComponent

  • All Implemented Interfaces:
    com.lucidworks.apollo.component.CollectionComponent.CollectionChangeAware

    @EnableConfigurationProperties(com.lucidworks.apollo.config.ConfigurationComponent.class)
    public class SolrClusterComponent
    extends java.lang.Object
    implements com.lucidworks.apollo.component.CollectionComponent.CollectionChangeAware
    Provides access to the Solr servers associated with a given collectionId.
    • Constructor Summary

      Constructors 
      Constructor Description
      SolrClusterComponent​(com.lucidworks.cloud.api.solr.SolrClusterDiscoveryClient solrClusterDiscoveryClient, com.lucidworks.apollo.component.CollectionStore collectionStore, com.lucidworks.apollo.component.CollectionComponent collectionComponent, com.lucidworks.apollo.config.ConfigurationComponent configurationComponent, org.apache.curator.framework.CuratorFramework curatorComponent)  
    • Constructor Detail

      • SolrClusterComponent

        @Inject
        public SolrClusterComponent​(com.lucidworks.cloud.api.solr.SolrClusterDiscoveryClient solrClusterDiscoveryClient,
                                    com.lucidworks.apollo.component.CollectionStore collectionStore,
                                    com.lucidworks.apollo.component.CollectionComponent collectionComponent,
                                    com.lucidworks.apollo.config.ConfigurationComponent configurationComponent,
                                    org.apache.curator.framework.CuratorFramework curatorComponent)
    • Method Detail

      • getSolrClient

        public org.apache.solr.client.solrj.SolrClient getSolrClient​(java.lang.String collectionId)
      • getSolrServer

        @Deprecated
        public org.apache.solr.client.solrj.SolrClient getSolrServer​(java.lang.String collectionId)
        Deprecated.
        Exists only for javascript back-compat reasons, see APOLLO-29567
      • getCloudSolrClient

        public org.apache.solr.client.solrj.impl.CloudSolrClient getCloudSolrClient​(java.lang.String cluster)
      • getBufferingSolrServer

        public BufferingSolrServer getBufferingSolrServer​(java.lang.String collectionId)
      • getBufferingSolrServer

        public BufferingSolrServer getBufferingSolrServer​(java.lang.String collectionId,
                                                          java.lang.Integer bufferSize,
                                                          java.lang.Long flushInterval)
      • getCollection

        public com.lucidworks.apollo.common.models.Collection getCollection​(java.lang.String collectionId)
      • getCommitWithin

        public int getCommitWithin​(java.lang.String collectionId)
      • getSearchCluster

        public com.lucidworks.apollo.common.models.SearchCluster getSearchCluster​(java.lang.String collectionId)
      • flushBuffers

        public void flushBuffers()
      • shutdown

        @PreDestroy
        public void shutdown()
      • getDocumentAssignmentStrategy

        public com.lucidworks.apollo.partitioning.DocumentAssignmentStrategy getDocumentAssignmentStrategy​(java.lang.String collectionId)
      • getCurator

        public org.apache.curator.framework.CuratorFramework getCurator​(com.lucidworks.apollo.common.models.SearchCluster searchCluster)
      • onCollectionRemoved

        public void onCollectionRemoved​(java.lang.String collectionId)
        Specified by:
        onCollectionRemoved in interface com.lucidworks.apollo.component.CollectionComponent.CollectionChangeAware
      • onCollectionAdded

        public void onCollectionAdded​(java.lang.String collectionId)
        Specified by:
        onCollectionAdded in interface com.lucidworks.apollo.component.CollectionComponent.CollectionChangeAware
      • onCollectionUpdated

        public void onCollectionUpdated​(java.lang.String collectionId)
        Specified by:
        onCollectionUpdated in interface com.lucidworks.apollo.component.CollectionComponent.CollectionChangeAware