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.- Author:
- Costin Leau, John Blum
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondoInGemfire
(Region<?, ?> region) This methods gets called byGemfireTemplate.execute(GemfireCallback)
.
-
Method Details
-
doInGemfire
This methods gets called byGemfireTemplate.execute(GemfireCallback)
. The method implementation does not need to care about handling transactions or exceptions. Allows a resultObject
created within this callback to be returned, i.e. an application domain object or a collection of application domain objects. A custom thrownRuntimeException
is treated as an application exception; the exception is propagated to the caller of the template.- Parameters:
region
-Region
on which the operation of this callback will be performed.- Returns:
- a result
Object
, or null if no result. - Throws:
GemFireCheckedException
- for checkedExceptions
occurring in GemFire.GemFireException
- forRuntimeExceptions
occurring in GemFire.- See Also:
-