public class GemfireAccessor
extends java.lang.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.InitializingBean
,
Region
Modifier and Type | Field and Description |
---|---|
protected org.slf4j.Logger |
logger |
Constructor and Description |
---|
GemfireAccessor() |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
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 |
convertGemFireQueryException(java.lang.RuntimeException ex)
Converts the given GemFire exception to an appropriate exception from the
org.springframework.dao hierarchy. |
<K,V> org.apache.geode.cache.Region<K,V> |
getRegion()
Returns the template GemFire Cache Region.
|
void |
setRegion(org.apache.geode.cache.Region<?,?> region)
Sets the template GemFire Cache Region.
|
public <K,V> org.apache.geode.cache.Region<K,V> getRegion()
K
- the Region key class type.V
- the Region value class type.Region
public void setRegion(org.apache.geode.cache.Region<?,?> region)
region
- the GemFire Cache Region used by this template.Region
public void afterPropertiesSet()
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
public org.springframework.dao.DataAccessException convertGemFireAccessException(org.apache.geode.GemFireCheckedException ex)
GemFireCheckedException
to an appropriate exception from the
org.springframework.dao
hierarchy.
May be overridden in subclasses.ex
- GemFireCheckedException that occurredpublic org.springframework.dao.DataAccessException convertGemFireAccessException(org.apache.geode.GemFireException ex)
GemFireException
to an appropriate exception from the
org.springframework.dao
hierarchy.
May be overridden in subclasses.ex
- GemFireException that occurredpublic org.springframework.dao.DataAccessException convertGemFireQueryException(java.lang.RuntimeException ex)
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.ex
- GemFireException that occurred