org.springframework.data.gemfire
Interface GemfireCallback<T>
public interface GemfireCallback<T>
Callback interface for GemFire code. 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
doInGemfire
T doInGemfire(Region region)
throws GemFireCheckedException,
GemFireException
- Gets called by
GemfireTemplate.execute(GemfireCallback)
. Does not need to care about handling transactions
or exceptions.
Allows for returning a result object created within the callback, i.e. a domain object or a collection of domain
objects. A thrown custom RuntimeException is treated as an application exception: It gets propagated to the caller
of the template.
- Parameters:
region
- GemFire Region
- Returns:
- a result object, or null if none
- Throws:
GemFireCheckedException
GemFireException
Copyright © 2010 SpringSource, a division of VMware. All Rights Reserved.