org.springframework.data.gemfire
Class GemfireAccessor

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

public class GemfireAccessor
extends Object
implements InitializingBean

Base class for GemfireTemplate and GemfireInterceptor, defining common properties such as Region. Not intended to be used directly.

See Also:
InitializingBean, Region

Field Summary
protected  org.apache.commons.logging.Log log
           
 
Constructor Summary
GemfireAccessor()
           
 
Method Summary
 void afterPropertiesSet()
           
 DataAccessException convertGemFireAccessException(com.gemstone.gemfire.GemFireCheckedException ex)
          Converts the given GemFireCheckedException to an appropriate exception from the org.springframework.dao hierarchy.
 DataAccessException convertGemFireAccessException(com.gemstone.gemfire.GemFireException ex)
          Converts the given GemFireException to an appropriate exception from the org.springframework.dao hierarchy.
 DataAccessException convertGemFireQueryException(RuntimeException ex)
          Converts the given GemFire exception to an appropriate exception from the org.springframework.dao hierarchy.
<K,V> com.gemstone.gemfire.cache.Region<K,V>
getRegion()
          Returns the template GemFire Cache Region.
 void setRegion(com.gemstone.gemfire.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 Detail

log

protected final org.apache.commons.logging.Log log
Constructor Detail

GemfireAccessor

public GemfireAccessor()
Method Detail

getRegion

public <K,V> com.gemstone.gemfire.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(com.gemstone.gemfire.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 InitializingBean

convertGemFireAccessException

public DataAccessException convertGemFireAccessException(com.gemstone.gemfire.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 DataAccessException convertGemFireAccessException(com.gemstone.gemfire.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 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