public abstract class GemfireDaoSupport extends DaoSupport
DaoSupport abstract class. Intended for use with GemfireTemplate.
Requires a Pivotal GemFire Region to be set, providing a GemfireTemplate based on it to subclasses.
Can alternatively be initialized directly via a GemfireTemplate reusing the template's settings.
This class will create its own GemfireTemplate if a Pivotal GemFire Region reference is passed in.
A custom GemfireTemplate instance can be used through overriding createGemfireTemplate.Region,
DaoSupport,
GemfireTemplatelogger| Constructor and Description |
|---|
GemfireDaoSupport() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkDaoConfig()
Verifies that this DAO has been configured properly.
|
protected GemfireTemplate |
createGemfireTemplate(org.apache.geode.cache.Region<?,?> region)
Creates an instance of the GemfireTemplate for the given Pivotal GemFire Cache Region.
|
GemfireOperations |
getGemfireTemplate()
Returns the GemfireTemplate for this DAO, pre-initialized with the Region or set explicitly.
|
void |
setGemfireTemplate(GemfireOperations gemfireTemplate)
Set the GemfireTemplate for this DAO explicitly as an alternative to specifying a Pivotal GemFire Cache
Region. |
void |
setRegion(org.apache.geode.cache.Region<?,?> region)
Sets the Pivotal GemFire Cache Region to be used by this DAO.
|
afterPropertiesSet, initDaopublic final void setGemfireTemplate(GemfireOperations gemfireTemplate)
Region.gemfireTemplate - the GemfireTemplate to be use by this DAO.GemfireOperations,
GemfireTemplate,
setRegion(org.apache.geode.cache.Region<?, ?>)public final GemfireOperations getGemfireTemplate()
GemfireOperations,
GemfireTemplatepublic void setRegion(org.apache.geode.cache.Region<?,?> region)
region - the Pivotal GemFire Cache Region upon which this DAO operates.Region,
createGemfireTemplate(org.apache.geode.cache.Region)protected GemfireTemplate createGemfireTemplate(org.apache.geode.cache.Region<?,?> region)
Can be overridden in subclasses to provide a GemfireTemplate instance with different configuration, or even a custom GemfireTemplate subclass.
region - the Pivotal GemFire Cache Region for which the GemfireTemplate is created.Region,
setRegion(org.apache.geode.cache.Region<?, ?>)protected final void checkDaoConfig()
checkDaoConfig in class DaoSupportCopyright © 2011–2021 Pivotal Software, Inc.. All rights reserved.