GemFire 6.0.1

com.gemstone.gemfire.cache.util
Class CqListenerAdapter

java.lang.Object
  extended by com.gemstone.gemfire.cache.util.CqListenerAdapter
All Implemented Interfaces:
CacheCallback, CqListener

public abstract class CqListenerAdapter
extends Object
implements CqListener


Constructor Summary
CqListenerAdapter()
           
 
Method Summary
 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.
 void onError(CqEvent aCqEvent)
          An error occurred in the processing of a CQ.
 void onEvent(CqEvent aCqEvent)
          An event occurred that modifies the results of the query.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CqListenerAdapter

public CqListenerAdapter()
Method Detail

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

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

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:
CacheCallback.close()

GemFire 6.0.1

Copyright © 2002-2009 GemStone Systems, Inc. All Rights Reserved.