Class OpenSearchServiceFactory
java.lang.Object
org.springframework.beans.factory.config.AbstractFactoryBean<T>
org.craftercms.deployer.utils.opensearch.AbstractOpenSearchFactory<org.craftercms.search.opensearch.OpenSearchService>
org.craftercms.deployer.utils.opensearch.OpenSearchServiceFactory
- All Implemented Interfaces:
org.springframework.beans.factory.Aware
,org.springframework.beans.factory.BeanClassLoaderAware
,org.springframework.beans.factory.BeanFactoryAware
,org.springframework.beans.factory.BeanNameAware
,org.springframework.beans.factory.DisposableBean
,org.springframework.beans.factory.FactoryBean<org.craftercms.search.opensearch.OpenSearchService>
,org.springframework.beans.factory.InitializingBean
public class OpenSearchServiceFactory
extends AbstractOpenSearchFactory<org.craftercms.search.opensearch.OpenSearchService>
Implementation of
AbstractOpenSearchFactory
for OpenSearchService
- Since:
- 3.1.5
- Author:
- joseross
-
Field Summary
Modifier and TypeFieldDescriptionprotected org.craftercms.search.opensearch.impl.OpenSearchDocumentBuilder
The document builderprotected org.craftercms.search.opensearch.DocumentParser
The document parserFields inherited from class org.craftercms.deployer.utils.opensearch.AbstractOpenSearchFactory
config, name
Fields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTE
-
Constructor Summary
ConstructorDescriptionOpenSearchServiceFactory
(OpenSearchConfig config, org.craftercms.search.opensearch.impl.OpenSearchDocumentBuilder documentBuilder, org.craftercms.search.opensearch.DocumentParser documentParser) -
Method Summary
Modifier and TypeMethodDescriptionprotected org.craftercms.search.opensearch.OpenSearchService
doCreateMultiInstance
(org.opensearch.client.opensearch.OpenSearchClient readClient, org.opensearch.client.opensearch.OpenSearchClient[] writeClients) Creates a service instance for a multiple clusterprotected org.craftercms.search.opensearch.OpenSearchService
doCreateSingleInstance
(org.opensearch.client.opensearch.OpenSearchClient client) Creates a service instance for a single clusterClass<?>
Methods inherited from class org.craftercms.deployer.utils.opensearch.AbstractOpenSearchFactory
createInstance, setBeanName
Methods inherited from class org.springframework.beans.factory.config.AbstractFactoryBean
afterPropertiesSet, destroy, destroyInstance, getBeanFactory, getBeanTypeConverter, getEarlySingletonInterfaces, getObject, isSingleton, setBeanClassLoader, setBeanFactory, setSingleton
-
Field Details
-
documentBuilder
protected org.craftercms.search.opensearch.impl.OpenSearchDocumentBuilder documentBuilderThe document builder -
documentParser
protected org.craftercms.search.opensearch.DocumentParser documentParserThe document parser
-
-
Constructor Details
-
OpenSearchServiceFactory
@ConstructorProperties({"config","documentBuilder","documentParser"}) public OpenSearchServiceFactory(OpenSearchConfig config, org.craftercms.search.opensearch.impl.OpenSearchDocumentBuilder documentBuilder, org.craftercms.search.opensearch.DocumentParser documentParser)
-
-
Method Details
-
getObjectType
- Specified by:
getObjectType
in interfaceorg.springframework.beans.factory.FactoryBean<org.craftercms.search.opensearch.OpenSearchService>
- Specified by:
getObjectType
in classorg.springframework.beans.factory.config.AbstractFactoryBean<org.craftercms.search.opensearch.OpenSearchService>
-
doCreateSingleInstance
protected org.craftercms.search.opensearch.OpenSearchService doCreateSingleInstance(org.opensearch.client.opensearch.OpenSearchClient client) Description copied from class:AbstractOpenSearchFactory
Creates a service instance for a single cluster- Specified by:
doCreateSingleInstance
in classAbstractOpenSearchFactory<org.craftercms.search.opensearch.OpenSearchService>
- Parameters:
client
- the OpenSearch client- Returns:
- the service instance
-
doCreateMultiInstance
protected org.craftercms.search.opensearch.OpenSearchService doCreateMultiInstance(org.opensearch.client.opensearch.OpenSearchClient readClient, org.opensearch.client.opensearch.OpenSearchClient[] writeClients) Description copied from class:AbstractOpenSearchFactory
Creates a service instance for a multiple cluster- Specified by:
doCreateMultiInstance
in classAbstractOpenSearchFactory<org.craftercms.search.opensearch.OpenSearchService>
- Parameters:
readClient
- the OpenSearch client for read-related operationswriteClients
- the OpenSearch clients for write-related operations- Returns:
- the service instance
-