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

    Fields
    Modifier and Type
    Field
    Description
    protected org.craftercms.search.opensearch.impl.OpenSearchDocumentBuilder
    The document builder
    protected org.craftercms.search.opensearch.DocumentParser
    The document parser

    Fields 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

    Constructors
    Constructor
    Description
    OpenSearchServiceFactory(OpenSearchConfig config, org.craftercms.search.opensearch.impl.OpenSearchDocumentBuilder documentBuilder, org.craftercms.search.opensearch.DocumentParser documentParser)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected 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 cluster
    protected org.craftercms.search.opensearch.OpenSearchService
    doCreateSingleInstance(org.opensearch.client.opensearch.OpenSearchClient client)
    Creates a service instance for a single cluster
     

    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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • documentBuilder

      protected org.craftercms.search.opensearch.impl.OpenSearchDocumentBuilder documentBuilder
      The document builder
    • documentParser

      protected org.craftercms.search.opensearch.DocumentParser documentParser
      The 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

      public Class<?> getObjectType()
      Specified by:
      getObjectType in interface org.springframework.beans.factory.FactoryBean<org.craftercms.search.opensearch.OpenSearchService>
      Specified by:
      getObjectType in class org.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 class AbstractOpenSearchFactory<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 class AbstractOpenSearchFactory<org.craftercms.search.opensearch.OpenSearchService>
      Parameters:
      readClient - the OpenSearch client for read-related operations
      writeClients - the OpenSearch clients for write-related operations
      Returns:
      the service instance