Spring Data for VMware GemFire
Package org.springframework.data.gemfire
Interface GemfireCallback<T>
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Callback interface for GemFire code.
Implementations of this interface are to be used with
GemfireTemplate's execution methods, often as anonymous
classes within a method implementation. A typical implementation will call Region.get/put/query to perform some
operations on stored objects.- See Also:
-
Region
-
Method Summary
Modifier and TypeMethodDescriptiondoInGemfire(org.apache.geode.cache.Region<?, ?> region) This methods gets called byGemfireTemplate.execute(GemfireCallback).
-
Method Details
-
doInGemfire
T doInGemfire(org.apache.geode.cache.Region<?, ?> region) throws org.apache.geode.GemFireCheckedException, org.apache.geode.GemFireExceptionThis methods gets called byGemfireTemplate.execute(GemfireCallback). The method implementation does not need to care about handling transactions or exceptions. Allows a resultObjectcreated within this callback to be returned, i.e. an application domain object or a collection of application domain objects. A custom thrownRuntimeExceptionis treated as an application exception; the exception is propagated to the caller of the template.- Parameters:
region-Regionon which the operation of this callback will be performed.- Returns:
- a result
Object, or null if no result. - Throws:
org.apache.geode.GemFireCheckedException- for checkedExceptionsoccurring in GemFire.org.apache.geode.GemFireException- forRuntimeExceptionsoccurring in GemFire.- See Also:
-
GemfireTemplateRegion
-