public class SearchClusterComponent extends java.lang.Object implements SolrClientFactory, CollectionComponent.CollectionChangeAware
Modifier and Type | Class and Description |
---|---|
static interface |
SearchClusterComponent.DefaultSolrClient
Represents the solrClient for the "Default" solr cluster.
|
static class |
SearchClusterComponent.OverrideCollectionAndDelegateSolrClient |
static interface |
SearchClusterComponent.SolrClientAvailableCallback |
Constructor and Description |
---|
SearchClusterComponent(SearchClusterStore searchClusterStore,
CollectionStore collectionStore,
CollectionComponent collectionComponent,
ClientComponent clientComponent,
ConfigurationComponent configurationComponent,
MetricRegistry metricRegistry,
ScheduledRunnableComponent scheduler,
Ignite ignite,
AuthContextComponent authContextComponent) |
Modifier and Type | Method and Description |
---|---|
void |
flushBuffers() |
void |
flushCaches()
Clears all of the internal caches.
|
void |
flushCollectionId(java.lang.String collectionId) |
void |
flushSearchClusterId(java.lang.String searchClusterId) |
com.lucidworks.apollo.common.auth.AuthContext |
getAuthContext(com.lucidworks.apollo.common.models.SearchCluster searchCluster) |
BufferingSolrServer |
getBufferingSolrServer(java.lang.String collectionId) |
com.lucidworks.apollo.common.models.Collection |
getCollection(java.lang.String collectionId) |
int |
getCommitWithin(java.lang.String collectionId) |
CuratorFramework |
getCurator(java.lang.String collectionId) |
com.lucidworks.apollo.partitioning.DocumentAssignmentStrategy |
getDocumentAssignmentStrategy(java.lang.String collectionId) |
HttpSolrClient |
getHttpSolrClient(com.lucidworks.apollo.common.models.SearchCluster searchCluster) |
HttpSolrClient |
getHttpSolrClient(java.lang.String collectionId) |
com.lucidworks.apollo.common.models.SearchCluster |
getSearchCluster(com.lucidworks.apollo.common.models.Collection col) |
com.lucidworks.apollo.common.models.SearchCluster |
getSearchCluster(java.lang.String collectionId) |
SearchClusterStore |
getSearchClusterStore() |
SolrClient |
getSolrClientForCollection(java.lang.String collectionId) |
SolrClient |
getSolrClientForSearchCluster(java.lang.String clusterId) |
org.apache.solr.client.solrj.SolrClient |
getSolrServer(java.lang.String collectionId) |
void |
init(DefaultSearchClusterRegistrar.DefaultSearchCluster dsc,
com.lucidworks.apollo.startup.DependencyManager dependencyManager,
CollectionStore collectionStore) |
void |
onCollectionAdded(java.lang.String collectionId) |
void |
onCollectionRemoved(java.lang.String collectionId) |
void |
onCollectionUpdated(java.lang.String collectionId) |
void |
onSearchClusterAvailable(java.lang.String searchClusterId,
SearchClusterComponent.SolrClientAvailableCallback callback) |
void |
shutdown() |
public SearchClusterComponent(SearchClusterStore searchClusterStore, CollectionStore collectionStore, CollectionComponent collectionComponent, ClientComponent clientComponent, ConfigurationComponent configurationComponent, MetricRegistry metricRegistry, ScheduledRunnableComponent scheduler, Ignite ignite, AuthContextComponent authContextComponent)
@WhenReady public void init(DefaultSearchClusterRegistrar.DefaultSearchCluster dsc, com.lucidworks.apollo.startup.DependencyManager dependencyManager, CollectionStore collectionStore)
public SolrClient getSolrClientForSearchCluster(java.lang.String clusterId)
getSolrClientForSearchCluster
in interface SolrClientFactory
public SolrClient getSolrClientForCollection(java.lang.String collectionId)
getSolrClientForCollection
in interface SolrClientFactory
public org.apache.solr.client.solrj.SolrClient getSolrServer(java.lang.String collectionId)
getSolrServer
in interface SolrClientFactory
public BufferingSolrServer getBufferingSolrServer(java.lang.String collectionId)
getBufferingSolrServer
in interface SolrClientFactory
public com.lucidworks.apollo.common.models.Collection getCollection(java.lang.String collectionId)
public int getCommitWithin(java.lang.String collectionId)
getCommitWithin
in interface SolrClientFactory
public com.lucidworks.apollo.common.models.SearchCluster getSearchCluster(java.lang.String collectionId)
public com.lucidworks.apollo.common.models.SearchCluster getSearchCluster(com.lucidworks.apollo.common.models.Collection col)
public CuratorFramework getCurator(java.lang.String collectionId)
public SearchClusterStore getSearchClusterStore()
public HttpSolrClient getHttpSolrClient(com.lucidworks.apollo.common.models.SearchCluster searchCluster)
public HttpSolrClient getHttpSolrClient(java.lang.String collectionId)
public com.lucidworks.apollo.common.auth.AuthContext getAuthContext(com.lucidworks.apollo.common.models.SearchCluster searchCluster)
public void flushBuffers()
public void flushCaches()
public void flushSearchClusterId(java.lang.String searchClusterId)
public void flushCollectionId(java.lang.String collectionId)
public void onSearchClusterAvailable(java.lang.String searchClusterId, SearchClusterComponent.SolrClientAvailableCallback callback)
@PreDestroy public void shutdown()
public com.lucidworks.apollo.partitioning.DocumentAssignmentStrategy getDocumentAssignmentStrategy(java.lang.String collectionId)
public void onCollectionRemoved(java.lang.String collectionId)
onCollectionRemoved
in interface CollectionComponent.CollectionChangeAware
public void onCollectionAdded(java.lang.String collectionId)
onCollectionAdded
in interface CollectionComponent.CollectionChangeAware
public void onCollectionUpdated(java.lang.String collectionId)
onCollectionUpdated
in interface CollectionComponent.CollectionChangeAware