Package com.lucidworks.cloud.api.solr
Class SolrClusterDiscoveryClientImpl
java.lang.Object
com.lucidworks.cloud.api.solr.SolrClusterDiscoveryClientImpl
- All Implemented Interfaces:
SolrClusterDiscoveryClient
Discovery client for Search Solr clusters.
Monitors
STORE_PATH directory in ZK. After discovering a change in a cluster entry,
it will inform its listeners so new Solr cloud clients can be created or removed.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSolrClusterDiscoveryClientImpl(org.apache.curator.framework.CuratorFramework curator, com.fasterxml.jackson.databind.ObjectMapper mapper, com.lucidworks.apollo.security.crypto.StringDecryptor decryptor, com.lucidworks.apollo.pipeline.schema.SchemaProcessorFactory schemaProcessorFactory) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddUpdateAction(Consumer<com.lucidworks.apollo.common.models.SearchCluster> updateNotificationListener) Register the listener to get notification about changes.protected voidclose()com.lucidworks.apollo.common.models.SearchClustergetCluster(String id) Collection<com.lucidworks.apollo.common.models.SearchCluster>protected voidinit()
-
Field Details
-
STORE_PATH
- See Also:
-
-
Constructor Details
-
SolrClusterDiscoveryClientImpl
@Autowired public SolrClusterDiscoveryClientImpl(org.apache.curator.framework.CuratorFramework curator, com.fasterxml.jackson.databind.ObjectMapper mapper, com.lucidworks.apollo.security.crypto.StringDecryptor decryptor, com.lucidworks.apollo.pipeline.schema.SchemaProcessorFactory schemaProcessorFactory)
-
-
Method Details
-
init
- Throws:
Exception
-
close
@PreDestroy protected void close() -
getCluster
- Specified by:
getClusterin interfaceSolrClusterDiscoveryClient
-
getClusters
- Specified by:
getClustersin interfaceSolrClusterDiscoveryClient
-
getClustersId
- Specified by:
getClustersIdin interfaceSolrClusterDiscoveryClient
-
addUpdateAction
public void addUpdateAction(Consumer<com.lucidworks.apollo.common.models.SearchCluster> updateNotificationListener) Description copied from interface:SolrClusterDiscoveryClientRegister the listener to get notification about changes. Argument to the listener is the changed cluster. Client should make a callback to DiscoverClient to find out is the change (add/update/remove) checking the list of currently available clusters- Specified by:
addUpdateActionin interfaceSolrClusterDiscoveryClient
-