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.CollectionChangeAware
Provides access to the Solr servers associated with a given collectionId.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SolrClusterComponent.OverrideCollectionSolrClient
Class 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 void
flushBuffers()
BufferingSolrServer
getBufferingSolrServer(java.lang.String collectionId)
BufferingSolrServer
getBufferingSolrServer(java.lang.String collectionId, java.lang.Integer bufferSize, java.lang.Long flushInterval)
org.apache.solr.client.solrj.impl.CloudSolrClient
getCloudSolrClient(java.lang.String cluster)
com.lucidworks.apollo.common.models.Collection
getCollection(java.lang.String collectionId)
int
getCommitWithin(java.lang.String collectionId)
org.apache.curator.framework.CuratorFramework
getCurator(com.lucidworks.apollo.common.models.SearchCluster searchCluster)
com.lucidworks.apollo.partitioning.DocumentAssignmentStrategy
getDocumentAssignmentStrategy(java.lang.String collectionId)
com.lucidworks.apollo.common.models.SearchCluster
getSearchCluster(java.lang.String collectionId)
org.apache.solr.client.solrj.SolrClient
getSolrClient(java.lang.String collectionId)
org.apache.solr.client.solrj.SolrClient
getSolrServer(java.lang.String collectionId)
Deprecated.void
onCollectionAdded(java.lang.String collectionId)
void
onCollectionRemoved(java.lang.String collectionId)
void
onCollectionUpdated(java.lang.String collectionId)
void
shutdown()
-
-
-
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 interfacecom.lucidworks.apollo.component.CollectionComponent.CollectionChangeAware
-
onCollectionAdded
public void onCollectionAdded(java.lang.String collectionId)
- Specified by:
onCollectionAdded
in interfacecom.lucidworks.apollo.component.CollectionComponent.CollectionChangeAware
-
onCollectionUpdated
public void onCollectionUpdated(java.lang.String collectionId)
- Specified by:
onCollectionUpdated
in interfacecom.lucidworks.apollo.component.CollectionComponent.CollectionChangeAware
-
-