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.

@FunctionalInterface public interface GemfireCallback<T>
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 Details

    • doInGemfire

      T doInGemfire(org.apache.geode.cache.Region<?,?> region) throws org.apache.geode.GemFireCheckedException, org.apache.geode.GemFireException
      This methods gets called by 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.
      Parameters:
      region - Region on which the operation of this callback will be performed.
      Returns:
      a result Object, or null if no result.
      Throws:
      org.apache.geode.GemFireCheckedException - for checked Exceptions occurring in GemFire.
      org.apache.geode.GemFireException - for RuntimeExceptions occurring in GemFire.
      See Also: