Class GemfireAccessor

java.lang.Object
org.springframework.data.gemfire.GemfireAccessor
All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean
Direct Known Subclasses:
GemfireTemplate

public class GemfireAccessor extends Object implements org.springframework.beans.factory.InitializingBean
GemfireAccessor is a base class for GemfireTemplate to encapsulate common operations and properties, such as accessors to a Region. This class is not intended to be used directly.
See Also:
  • InitializingBean
  • Region
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final org.slf4j.Logger
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    org.springframework.dao.DataAccessException
    convertGemFireAccessException(org.apache.geode.GemFireCheckedException ex)
    Converts the given GemFireCheckedException to an appropriate exception from the org.springframework.dao hierarchy.
    org.springframework.dao.DataAccessException
    convertGemFireAccessException(org.apache.geode.GemFireException ex)
    Converts the given GemFireException to an appropriate exception from the org.springframework.dao hierarchy.
    org.springframework.dao.DataAccessException
    Converts the given GemFire exception to an appropriate exception from the org.springframework.dao hierarchy.
    <K, V> org.apache.geode.cache.Region<K,V>
    Returns the template GemFire Cache Region.
    void
    setRegion(org.apache.geode.cache.Region<?,?> region)
    Sets the template GemFire Cache Region.

    Methods inherited from class java.lang.Object

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

    • logger

      protected final org.slf4j.Logger logger
  • Constructor Details

    • GemfireAccessor

      public GemfireAccessor()
  • Method Details

    • getRegion

      public <K, V> org.apache.geode.cache.Region<K,V> getRegion()
      Returns the template GemFire Cache Region.
      Type Parameters:
      K - the Region key class type.
      V - the Region value class type.
      Returns:
      the GemFire Cache Region.
      See Also:
      • Region
    • setRegion

      public void setRegion(org.apache.geode.cache.Region<?,?> region)
      Sets the template GemFire Cache Region.
      Parameters:
      region - the GemFire Cache Region used by this template.
      See Also:
      • Region
    • afterPropertiesSet

      public void afterPropertiesSet()
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
    • convertGemFireAccessException

      public org.springframework.dao.DataAccessException convertGemFireAccessException(org.apache.geode.GemFireCheckedException ex)
      Converts the given GemFireCheckedException to an appropriate exception from the org.springframework.dao hierarchy. May be overridden in subclasses.
      Parameters:
      ex - GemFireCheckedException that occurred
      Returns:
      the corresponding DataAccessException instance
    • convertGemFireAccessException

      public org.springframework.dao.DataAccessException convertGemFireAccessException(org.apache.geode.GemFireException ex)
      Converts the given GemFireException to an appropriate exception from the org.springframework.dao hierarchy. May be overridden in subclasses.
      Parameters:
      ex - GemFireException that occurred
      Returns:
      the corresponding DataAccessException instance
    • convertGemFireQueryException

      public org.springframework.dao.DataAccessException convertGemFireQueryException(RuntimeException ex)
      Converts the given GemFire exception to an appropriate exception from the org.springframework.dao hierarchy. Note that this particular implementation is called only for GemFire querying exception that do NOT extend from GemFire exception. May be overridden in subclasses.
      Parameters:
      ex - GemFireException that occurred
      Returns:
      the corresponding DataAccessException instance