Package com.lucidworks.cloud.api.solr
Class SolrClusterComponent
- java.lang.Object
-
- com.lucidworks.cloud.api.solr.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.CollectionChangeAwareProvides access to the Solr servers associated with a given collectionId.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSolrClusterComponent.OverrideCollectionSolrClientClass to remember the requested collection.
-
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)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidflushBuffers()BufferingSolrServergetBufferingSolrServer(java.lang.String collectionId)BufferingSolrServergetBufferingSolrServer(java.lang.String collectionId, java.lang.Integer bufferSize, java.lang.Long flushInterval)org.apache.solr.client.solrj.impl.CloudSolrClientgetCloudSolrClient(java.lang.String cluster)com.lucidworks.apollo.common.models.CollectiongetCollection(java.lang.String collectionId)intgetCommitWithin(java.lang.String collectionId)org.apache.curator.framework.CuratorFrameworkgetCurator(com.lucidworks.apollo.common.models.SearchCluster searchCluster)com.lucidworks.apollo.partitioning.DocumentAssignmentStrategygetDocumentAssignmentStrategy(java.lang.String collectionId)com.lucidworks.apollo.common.models.SearchClustergetSearchCluster(java.lang.String collectionId)org.apache.solr.client.solrj.SolrClientgetSolrClient(java.lang.String collectionId)org.apache.solr.client.solrj.SolrClientgetSolrServer(java.lang.String collectionId)Deprecated.voidonCollectionAdded(java.lang.String collectionId)voidonCollectionRemoved(java.lang.String collectionId)voidonCollectionUpdated(java.lang.String collectionId)voidshutdown()
-
-
-
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:
onCollectionRemovedin interfacecom.lucidworks.apollo.component.CollectionComponent.CollectionChangeAware
-
onCollectionAdded
public void onCollectionAdded(java.lang.String collectionId)
- Specified by:
onCollectionAddedin interfacecom.lucidworks.apollo.component.CollectionComponent.CollectionChangeAware
-
onCollectionUpdated
public void onCollectionUpdated(java.lang.String collectionId)
- Specified by:
onCollectionUpdatedin interfacecom.lucidworks.apollo.component.CollectionComponent.CollectionChangeAware
-
-