Package com.lucidworks.cloud.api.solr
Class SolrClusterComponent
java.lang.Object
com.lucidworks.cloud.api.solr.SolrClusterComponent
- All Implemented Interfaces:
CollectionComponent.CollectionChangeAware
@EnableConfigurationProperties(ConfigurationComponent.class)
public class SolrClusterComponent
extends Object
implements CollectionComponent.CollectionChangeAware
Provides access to the Solr servers associated with a given collectionId.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classClass to remember the requested collection. -
Constructor Summary
ConstructorsConstructorDescriptionSolrClusterComponent(SolrClusterDiscoveryClient solrClusterDiscoveryClient, CollectionStore collectionStore, CollectionComponent collectionComponent, ConfigurationComponent configurationComponent, org.apache.curator.framework.CuratorFramework curatorComponent) -
Method Summary
Modifier and TypeMethodDescriptionprotected org.apache.solr.client.solrj.impl.CloudSolrClientcreateSolrClientForCluster(com.lucidworks.apollo.common.models.SearchCluster searchCluster) voidgetBufferingSolrServer(String collectionId) getBufferingSolrServer(String collectionId, Integer bufferSize, Long flushInterval) org.apache.solr.client.solrj.impl.CloudSolrClientgetCloudSolrClient(String cluster) com.lucidworks.apollo.common.models.CollectiongetCollection(String collectionId) intgetCommitWithin(String collectionId) org.apache.curator.framework.CuratorFrameworkgetCurator(com.lucidworks.apollo.common.models.SearchCluster searchCluster) getDocumentAssignmentStrategy(String collectionId) com.lucidworks.apollo.common.models.SearchClustergetSearchCluster(String collectionId) org.apache.solr.client.solrj.SolrClientgetSolrClient(String collectionId) org.apache.solr.client.solrj.SolrClientgetSolrServer(String collectionId) Deprecated.protected voidinvalidateCachedDocumentAssignmentStrategy(String collectionId) voidonCollectionAdded(String collectionId) voidonCollectionRemoved(String collectionId) voidonCollectionUpdated(String collectionId) voidshutdown()
-
Constructor Details
-
SolrClusterComponent
@Inject public SolrClusterComponent(SolrClusterDiscoveryClient solrClusterDiscoveryClient, CollectionStore collectionStore, CollectionComponent collectionComponent, ConfigurationComponent configurationComponent, org.apache.curator.framework.CuratorFramework curatorComponent)
-
-
Method Details
-
createSolrClientForCluster
protected org.apache.solr.client.solrj.impl.CloudSolrClient createSolrClientForCluster(com.lucidworks.apollo.common.models.SearchCluster searchCluster) -
getSolrClient
-
getSolrServer
Deprecated.Exists only for javascript back-compat reasons, see APOLLO-29567 -
getCloudSolrClient
-
getBufferingSolrServer
-
getBufferingSolrServer
public BufferingSolrServer getBufferingSolrServer(String collectionId, Integer bufferSize, Long flushInterval) -
getCollection
-
getCommitWithin
-
getSearchCluster
-
flushBuffers
public void flushBuffers() -
shutdown
@PreDestroy public void shutdown() -
getDocumentAssignmentStrategy
-
getCurator
public org.apache.curator.framework.CuratorFramework getCurator(com.lucidworks.apollo.common.models.SearchCluster searchCluster) -
onCollectionRemoved
- Specified by:
onCollectionRemovedin interfaceCollectionComponent.CollectionChangeAware
-
onCollectionAdded
- Specified by:
onCollectionAddedin interfaceCollectionComponent.CollectionChangeAware
-
onCollectionUpdated
- Specified by:
onCollectionUpdatedin interfaceCollectionComponent.CollectionChangeAware
-
invalidateCachedDocumentAssignmentStrategy
-