Class CqListenerAdapter

java.lang.Object
org.apache.geode.cache.util.CqListenerAdapter
All Implemented Interfaces:
CacheCallback, Declarable, CqListener

public abstract class CqListenerAdapter extends Object implements CqListener
  • Constructor Details

    • CqListenerAdapter

      public CqListenerAdapter()
  • Method Details

    • onEvent

      public void onEvent(CqEvent aCqEvent)
      An event occurred that modifies the results of the query. This event does not contain an error.
      Specified by:
      onEvent in interface CqListener
      Parameters:
      aCqEvent - the CqEvent that triggered the listener
      See Also:
    • onError

      public void onError(CqEvent aCqEvent)
      An error occurred in the processing of a CQ. This event does contain an error. The newValue and oldValue in the event may or may not be available, and will be null if not available.
      Specified by:
      onError in interface CqListener
      Parameters:
      aCqEvent - the CqEvent which encountered the error
    • close

      public void close()
      Called when the CQ is closed, the base region is destroyed, when the cache is closed, or when this listener is removed from a CqQuery using a CqAttributesMutator.

      Implementations should cleanup any external resources such as database connections. Any runtime exceptions this method throws will be logged.

      It is possible for this method to be called multiple times on a single callback instance, so implementations must be tolerant of this.

      Specified by:
      close in interface CacheCallback
      See Also: