Class LuceneIndexFactoryBean

java.lang.Object
org.springframework.data.gemfire.support.AbstractFactoryBeanSupport<org.apache.geode.cache.lucene.LuceneIndex>
org.springframework.data.gemfire.search.lucene.LuceneIndexFactoryBean
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.apache.geode.cache.lucene.LuceneIndex>, org.springframework.beans.factory.InitializingBean

public class LuceneIndexFactoryBean extends AbstractFactoryBeanSupport<org.apache.geode.cache.lucene.LuceneIndex> implements org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.InitializingBean
Deprecated.
To be removed in GemFire 10 integration
Spring FactoryBean used to construct, configure and initialize Lucene Indexes on application domain object fields.
Since:
1.1.0
See Also:
  • Field Details

    • DEFAULT_DESTROY

      protected static final boolean DEFAULT_DESTROY
      Deprecated.
      See Also:
  • Constructor Details

    • LuceneIndexFactoryBean

      public LuceneIndexFactoryBean()
      Deprecated.
  • Method Details

    • afterPropertiesSet

      public void afterPropertiesSet() throws Exception
      Deprecated.
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
      Throws:
      Exception
    • applyIndexConfigurers

      protected void applyIndexConfigurers(String indexName, IndexConfigurer... indexConfigurers)
      Deprecated.
      Applies the given array of IndexConfigurers to this LuceneIndexFactoryBean.
      Parameters:
      indexName - String containing the name of the LuceneIndex.
      indexConfigurers - array of IndexConfigurers applied to this LuceneIndexFactoryBean.
      See Also:
    • applyIndexConfigurers

      protected void applyIndexConfigurers(String indexName, Iterable<IndexConfigurer> indexConfigurers)
      Deprecated.
      Applies the given Iterable of IndexConfigurers to this LuceneIndexFactoryBean.
      Parameters:
      indexName - String containing the name of the LuceneIndex.
      indexConfigurers - Iterable of IndexConfigurers applied to this LuceneIndexFactoryBean.
      See Also:
    • createLuceneIndex

      protected org.apache.geode.cache.lucene.LuceneIndex createLuceneIndex(String indexName, String regionPath)
      Deprecated.
      Creates a LuceneIndex with the given indexName on the GemFireCache Region identified by the given regionPath.
      Parameters:
      indexName - String containing the name for the LuceneIndex.
      regionPath - String containing the fully-qualified pathname to the GemFireCache Region.
      Returns:
      a new instance of LuceneIndex with the given indexName on the named Region.
      See Also:
    • postProcess

      protected org.apache.geode.cache.lucene.LuceneIndexFactory postProcess(org.apache.geode.cache.lucene.LuceneIndexFactory luceneIndexFactory)
      Deprecated.
      Performs additional post processing to the newly created LuceneIndexFactory.
      Parameters:
      luceneIndexFactory - LuceneIndexFactory to post process.
      Returns:
      the given LuceneIndexFactory.
      See Also:
      • LuceneIndexFactory
    • postProcess

      protected org.apache.geode.cache.lucene.LuceneIndex postProcess(org.apache.geode.cache.lucene.LuceneIndex luceneIndex)
      Deprecated.
      Performs additional post processing to the newly created LuceneIndex.
      Parameters:
      luceneIndex - LuceneIndex created by this LuceneIndexFactoryBean.
      Returns:
      the given LuceneIndex.
      See Also:
      • LuceneIndex
    • resolveLuceneIndex

      protected org.apache.geode.cache.lucene.LuceneIndex resolveLuceneIndex(String indexName, String regionPath)
      Deprecated.
      Attempts to resolve a LuceneIndex by the given indexName first then attempts to create the LuceneIndex with the given Region path.
      Parameters:
      indexName - name of the LuceneIndex to resolve.
      regionPath - Region path on which the LuceneIndex is applied.
      Returns:
      the resolved LuceneIndex by the given indexName or the created LuceneIndex with the given Region path if the LuceneIndex could not be resolved by indexName.
      See Also:
    • destroy

      public void destroy() throws Exception
      Deprecated.
      Specified by:
      destroy in interface org.springframework.beans.factory.DisposableBean
      Throws:
      Exception
    • isLuceneIndexDestroyable

      protected boolean isLuceneIndexDestroyable(org.apache.geode.cache.lucene.LuceneIndex luceneIndex)
      Deprecated.
      Determine whether the given LuceneIndex created by this FactoryBean is destroyable.
      Parameters:
      luceneIndex - LuceneIndex subject to destruction.
      Returns:
      a boolean value indicating whether the given LuceneIndex created by this FactoryBean is destroyable.
      See Also:
    • getObject

      public org.apache.geode.cache.lucene.LuceneIndex getObject() throws Exception
      Deprecated.
      Specified by:
      getObject in interface org.springframework.beans.factory.FactoryBean<org.apache.geode.cache.lucene.LuceneIndex>
      Throws:
      Exception
    • getObjectType

      public Class<?> getObjectType()
      Deprecated.
      Specified by:
      getObjectType in interface org.springframework.beans.factory.FactoryBean<org.apache.geode.cache.lucene.LuceneIndex>
    • resolveCache

      protected org.apache.geode.cache.GemFireCache resolveCache()
      Deprecated.
      Resolves a reference to the GemFireCache.
      Returns:
      a reference to the single instance of the GemFireCache.
      See Also:
    • resolveFields

      protected List<String> resolveFields(List<String> fields)
      Deprecated.
      Resolves the List of fields on the object to index.
      Parameters:
      fields - List of fields to evaluate.
      Returns:
      a resolve List of object fields to index.
    • resolveLuceneIndexFactory

      protected org.apache.geode.cache.lucene.LuceneIndexFactory resolveLuceneIndexFactory()
      Deprecated.
      Resolves the appropriate LuceneIndexFactory from the LuceneService.
      Returns:
      a newly created instance of the LuceneIndexFactory from the resolved LuceneService.
      See Also:
    • resolveLuceneService

      protected org.apache.geode.cache.lucene.LuceneService resolveLuceneService()
      Deprecated.
      Resolves the LuceneService used by this FactoryBean to create the LuceneIndex.
      Returns:
      a reference to the GemFireCache, LuceneService.
      See Also:
    • resolveLuceneService

      protected org.apache.geode.cache.lucene.LuceneService resolveLuceneService(org.apache.geode.cache.GemFireCache gemfireCache)
      Deprecated.
      Resolves the LuceneService used by this FactoryBean to create the LuceneIndex.
      Parameters:
      gemfireCache - GemFireCache used to resolve the LuceneService.
      Returns:
      a reference to the GemFireCache LuceneService.
      Throws:
      IllegalArgumentException - if GemFireCache is null.
      See Also:
      • LuceneService
      • GemFireCache
    • resolveRegion

      protected org.apache.geode.cache.Region<?,?> resolveRegion()
      Deprecated.
      Attempts to resolve the GemFireCache Region on which the LuceneIndex will be created.
      Returns:
      a reference to the GemFireCache Region on which he LuceneIndex will be created. Returns null if the Region cannot be resolved.
      See Also:
    • resolveRegionPath

      protected String resolveRegionPath()
      Deprecated.
      Resolves the fully-qualified pathname of the GemFireCache Region on which the LuceneIndex will be created.
      Returns:
      a String containing the fully-qualified pathname of the GemFireCache Region on which the LuceneIndex will be created.
      Throws:
      IllegalStateException - if the Region pathname could not resolved.
      See Also:
    • setBeanName

      public void setBeanName(String name)
      Deprecated.
      Description copied from class: AbstractFactoryBeanSupport
      Sets the bean name assigned to this FactoryBean as declared in the Spring container.
      Specified by:
      setBeanName in interface org.springframework.beans.factory.BeanNameAware
      Overrides:
      setBeanName in class AbstractFactoryBeanSupport<org.apache.geode.cache.lucene.LuceneIndex>
      Parameters:
      name - bean name assigned to this FactoryBean as declared in the Spring container.
      See Also:
      • BeanNameAware.setBeanName(String)
      • String
    • setCache

      public void setCache(org.apache.geode.cache.GemFireCache gemfireCache)
      Deprecated.
      Sets a reference to the GemFireCache.
      Parameters:
      gemfireCache - GemFireCache reference.
      See Also:
      • GemFireCache
    • getCache

      protected org.apache.geode.cache.GemFireCache getCache()
      Deprecated.
      Returns a reference to the GemFireCache.
      Returns:
      a reference to the GemFireCache.
      See Also:
    • getCompositeIndexConfigurer

      protected IndexConfigurer getCompositeIndexConfigurer()
      Deprecated.
      Returns a reference to the Composite IndexConfigurer used to apply additional configuration to this LuceneIndexFactoryBean on Spring container initialization.
      Returns:
      the Composite IndexConfigurer.
      See Also:
    • setDestroy

      public void setDestroy(boolean destroy)
      Deprecated.
      Sets whether to destroy the LuceneIndex on shutdown.
      Parameters:
      destroy - boolean value indicating whether to destroy the LuceneIndex on shutdown.
    • isDestroy

      protected boolean isDestroy()
      Deprecated.
      Determines whether the LuceneIndex will be destroyed on shutdown.
      Returns:
      a boolean value indicating whether the LuceneIndex will be destroyed on shutdown.
      See Also:
      • DisposableBean.destroy()
    • setFieldAnalyzers

      public void setFieldAnalyzers(Map<String,org.apache.lucene.analysis.Analyzer> fieldAnalyzers)
      Deprecated.
      Set a Map of application domain object field names to Analyzers used in the construction of the Lucene Indexes for each field.
      Parameters:
      fieldAnalyzers - Map of fields names to Analyzers.
      See Also:
    • getFieldAnalyzers

      protected Map<String,org.apache.lucene.analysis.Analyzer> getFieldAnalyzers()
      Deprecated.
      Returns a Map of application domain object field names to Analyzers used in the construction of the Lucene Indexes for each field.
      Returns:
      a Map of fields names to Analyzers.
      See Also:
    • setFields

      public void setFields(String... fields)
      Deprecated.
      Sets the application domain object fields to index.
      Parameters:
      fields - array of Strings containing the names of the object fields ot index.
      See Also:
    • setFields

      public void setFields(List<String> fields)
      Deprecated.
      Sets the application domain object fields to index.
      Parameters:
      fields - List of Strings containing the names of the object fields ot index.
    • getFields

      protected List<String> getFields()
      Deprecated.
      Returns a List of application domain object fields to be indexed.
      Returns:
      a List of application domain object fields to be indexed.
      See Also:
    • setIndexConfigurers

      public void setIndexConfigurers(IndexConfigurer... indexConfigurers)
      Deprecated.
      Null-safe operation to set an array of IndexConfigurers used to apply additional configuration to this LuceneIndexFactoryBean when using Annotation-based configuration.
      Parameters:
      indexConfigurers - array of IndexConfigurers used to apply additional configuration to this LuceneIndexFactoryBean.
      See Also:
    • setIndexConfigurers

      public void setIndexConfigurers(List<IndexConfigurer> indexConfigurers)
      Deprecated.
      Null-safe operation to set an Iterable of IndexConfigurers used to apply additional configuration to this LuceneIndexFactoryBean when using Annotation-based configuration.
      Parameters:
      indexConfigurers - Iterable of IndexConfigurers used to apply additional configuration to this LuceneIndexFactoryBean.
      See Also:
    • setIndexName

      public void setIndexName(String indexName)
      Deprecated.
      Sets the name of the LuceneIndex as identified in the GemFireCache.
      Parameters:
      indexName - String containing the name of the LuceneIndex.
      See Also:
    • getIndexName

      protected String getIndexName()
      Deprecated.
      Returns the name of the LuceneIndex as identified in the GemFireCache.
      Returns:
      a String containing the name of the LuceneIndex.
      Throws:
      IllegalStateException - if the indexName was not specified.
    • getLuceneIndex

      public Optional<org.apache.geode.cache.lucene.LuceneIndex> getLuceneIndex()
      Deprecated.
      Returns an Optional reference to the LuceneIndex created by this LuceneIndexFactoryBean.
      Returns:
      an Optional reference to the LuceneIndex created by this LuceneIndexFactoryBean.
      See Also:
    • setLuceneIndex

      public LuceneIndexFactoryBean setLuceneIndex(org.apache.geode.cache.lucene.LuceneIndex luceneIndex)
      Deprecated.
      Sets the given LuceneIndex as the index created by this FactoryBean. This method is generally used for testing purposes only.
      Parameters:
      luceneIndex - LuceneIndex created by this FactoryBean.
      Returns:
      this LuceneIndexFactoryBean.
      See Also:
    • setLuceneSerializer

      public void setLuceneSerializer(org.apache.geode.cache.lucene.LuceneSerializer<?> luceneSerializer)
      Deprecated.
      Configures a reference to the LuceneSerializer used to convert objects to Lucene documents for the LuceneIndex created by this LuceneIndexFactoryBean.
      Parameters:
      luceneSerializer - LuceneSerializer used to convert objects to Lucene documents for the LuceneIndex.
      See Also:
      • LuceneSerializer
    • getLuceneSerializer

      protected org.apache.geode.cache.lucene.LuceneSerializer<?> getLuceneSerializer()
      Deprecated.
      Returns a reference to the LuceneSerializer used to convert objects to Lucene documents for the LuceneIndex created by this LuceneIndexFactoryBean.
      Returns:
      a LuceneSerializer used to convert objects to Lucene documents for the LuceneIndex.
      See Also:
      • LuceneSerializer
    • setLuceneService

      public void setLuceneService(org.apache.geode.cache.lucene.LuceneService luceneService)
      Deprecated.
      Configures a reference to the LuceneService used by this FactoryBean to create the LuceneIndex.
      Parameters:
      luceneService - LuceneService used to create the LuceneIndex.
      See Also:
      • LuceneService
    • getLuceneService

      protected org.apache.geode.cache.lucene.LuceneService getLuceneService()
      Deprecated.
      Returns a reference to the LuceneService used by this FactoryBean to create the LuceneIndex.
      Returns:
      a reference to the LuceneService used to create the LuceneIndex.
      See Also:
    • setRegion

      public void setRegion(org.apache.geode.cache.Region<?,?> region)
      Deprecated.
      Sets a reference to the GemFireCache Region on which the LuceneIndex will be created.
      Parameters:
      region - Region on which the LuceneIndex will be created.
      See Also:
    • getRegion

      protected org.apache.geode.cache.Region<?,?> getRegion()
      Deprecated.
      Returns a reference to the GemFireCache Region on which the LuceneIndex will be created.
      Returns:
      a reference to the Region on which the LuceneIndex will be created.
      See Also:
    • setRegionPath

      public void setRegionPath(String pathname)
      Deprecated.
      Sets the fully-qualified pathname to the GemFireCache Region on which the LuceneIndex will be created.
      Parameters:
      pathname - String containing the fully-qualified pathname to the GemFireCache Region on which the LuceneIndex will be created.
      See Also:
    • getRegionPath

      protected String getRegionPath()
      Deprecated.
      Returns the fully-qualified pathname to the GemFireCache Region on which the LuceneIndex will be created.
      Returns:
      a String containing the fully-qualified pathname to the GemFireCache Region on which the LuceneIndex will be created.
      See Also: