Class AbstractCachingRegionResolver

java.lang.Object
org.apache.geode.cache.util.CacheListenerAdapter
org.springframework.data.gemfire.support.AbstractCachingRegionResolver
All Implemented Interfaces:
org.apache.geode.cache.CacheCallback, org.apache.geode.cache.CacheListener, org.apache.geode.cache.Declarable, RegionResolver
Direct Known Subclasses:
BeanFactoryRegionResolver, ComposableRegionResolver, RegionServiceRegionResolver

public abstract class AbstractCachingRegionResolver extends org.apache.geode.cache.util.CacheListenerAdapter implements RegionResolver
RegionResolver implementation capable of caching the results of a Region resolution (lookup) operation.
Since:
2.3.0
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    afterRegionDestroy(org.apache.geode.cache.RegionEvent event)
    Clears the cache entry for the Region identified by the RegionEvent.
    protected abstract <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.
    <K, V> org.apache.geode.cache.Region<K,V>
    resolve(String regionName)
    Returns a Region resolved with the given name.

    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

    • AbstractCachingRegionResolver

      public AbstractCachingRegionResolver()
  • Method Details

    • resolve

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

      @Nullable protected abstract <K, V> org.apache.geode.cache.Region<K,V> doResolve(@Nullable String regionName)
      Performs the actual Region resolution operation to resolve a Region with the given name.
      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:
    • afterRegionDestroy

      public void afterRegionDestroy(@Nullable org.apache.geode.cache.RegionEvent event)
      Clears the cache entry for the Region identified by the RegionEvent.
      Specified by:
      afterRegionDestroy in interface org.apache.geode.cache.CacheListener
      Overrides:
      afterRegionDestroy in class org.apache.geode.cache.util.CacheListenerAdapter
      Parameters:
      event - RegionEvent object capturing the details of the Region destroyed event.
      See Also:
      • RegionEvent
      • remove(String)