@FunctionalInterface public interface GemfireCallback<T>
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.Region
Modifier and Type | Method and Description |
---|---|
T |
doInGemfire(org.apache.geode.cache.Region<?,?> region)
This methods gets called by
GemfireTemplate.execute(GemfireCallback) . |
T doInGemfire(org.apache.geode.cache.Region<?,?> region) throws org.apache.geode.GemFireCheckedException, org.apache.geode.GemFireException
GemfireTemplate.execute(GemfireCallback)
.
The method implementation does not need to care about handling transactions or exceptions.
Allows a result Object
created within this callback to be returned, i.e. an application domain object
or a collection of application domain objects.
A custom thrown RuntimeException
is treated as an application exception; the exception is propagated to
the caller of the template.region
- Region
on which the operation of this callback will be performed.Object
, or null if no result.org.apache.geode.GemFireCheckedException
- for checked Exceptions
occurring in GemFire.org.apache.geode.GemFireException
- for RuntimeExceptions
occurring in GemFire.GemfireTemplate
,
Region
Copyright © 2011–2021 Pivotal Software, Inc.. All rights reserved.