Class BeanFactoryRegionResolver

java.lang.Object
org.apache.geode.cache.util.CacheListenerAdapter
org.springframework.data.gemfire.support.AbstractCachingRegionResolver
org.springframework.data.gemfire.support.BeanFactoryRegionResolver
All Implemented Interfaces:
org.apache.geode.cache.CacheCallback, org.apache.geode.cache.CacheListener, org.apache.geode.cache.Declarable, org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanFactoryAware, RegionResolver

public class BeanFactoryRegionResolver extends AbstractCachingRegionResolver implements org.springframework.beans.factory.BeanFactoryAware
RegionResolver implementation used to resolve a Region by name from a Spring BeanFactory.
Since:
2.3.0
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    BeanFactoryRegionResolver(org.springframework.beans.factory.BeanFactory beanFactory)
    Constructs a new instance of BeanFactoryRegionResolver initialized with the given BeanFactory.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected <K, V> org.apache.geode.cache.Region<K,V>
    doResolve(String regionName)
    Performs the actual Region resolution operation to resolve a Region with the given name.
    protected org.springframework.beans.factory.BeanFactory
    Returns the configured reference to the BeanFactory used to resolve cache Regions.
    final void
    setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
    Sets a reference to the BeanFactory used to resolve cache Regions.

    Methods inherited from class org.springframework.data.gemfire.support.AbstractCachingRegionResolver

    afterRegionDestroy, resolve

    Methods inherited from class org.apache.geode.cache.util.CacheListenerAdapter

    afterCreate, afterDestroy, afterInvalidate, afterRegionClear, afterRegionCreate, afterRegionInvalidate, afterRegionLive, afterUpdate, close

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.apache.geode.cache.Declarable

    init, initialize

    Methods inherited from interface org.springframework.data.gemfire.RegionResolver

    require
  • Constructor Details

    • BeanFactoryRegionResolver

      public BeanFactoryRegionResolver(org.springframework.beans.factory.BeanFactory beanFactory)
      Constructs a new instance of BeanFactoryRegionResolver initialized with the given BeanFactory.
      Parameters:
      beanFactory - BeanFactory used to resolve cache Regions.
      Throws:
      IllegalArgumentException - if BeanFactory is null.
      See Also:
  • Method Details

    • setBeanFactory

      public final void setBeanFactory(@NonNull org.springframework.beans.factory.BeanFactory beanFactory) throws org.springframework.beans.BeansException
      Sets a reference to the BeanFactory used to resolve cache Regions.
      Specified by:
      setBeanFactory in interface org.springframework.beans.factory.BeanFactoryAware
      Parameters:
      beanFactory - BeanFactory used to resolve cache Regions.
      Throws:
      IllegalArgumentException - if BeanFactory is null.
      org.springframework.beans.BeansException - if configuration of the BeanFactory fails.
      See Also:
      • BeanFactory
    • getBeanFactory

      @NonNull protected org.springframework.beans.factory.BeanFactory getBeanFactory()
      Returns the configured reference to the BeanFactory used to resolve cache Regions.
      Returns:
      a reference to the configured BeanFactory.
      See Also:
      • BeanFactory
    • doResolve

      @Nullable protected <K, V> org.apache.geode.cache.Region<K,V> doResolve(@Nullable String regionName)
      Description copied from class: AbstractCachingRegionResolver
      Performs the actual Region resolution operation to resolve a Region with the given name.
      Specified by:
      doResolve in class AbstractCachingRegionResolver
      Type Parameters:
      K - type of the Region key.
      V - type of the Region value.
      Parameters:
      regionName - name of the Region to resolve.
      Returns:
      the resolved Region with the given name; may be null.
      See Also: