public class MyAsyncEventListener extends Object implements com.gemstone.gemfire.cache.asyncqueue.AsyncEventListener<Object,Object>, com.gemstone.gemfire.cache.Declarable
| Modifier and Type | Field and Description |
|---|---|
static int |
lastEventTime |
int |
whereIWasRegistered
The process ID of the VM that created this listener
|
| Constructor and Description |
|---|
MyAsyncEventListener()
noArg constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
boolean |
hasSeenEvent(com.gemstone.gemfire.cache.asyncqueue.AsyncEvent event)
Return boolean value to validate duplicity of event.
|
void |
init(Properties prop) |
String |
logCall(String methodName,
com.gemstone.gemfire.cache.asyncqueue.AsyncEvent event)
Log that a gateway event occurred.
|
boolean |
processEvents(List<com.gemstone.gemfire.cache.asyncqueue.AsyncEvent<Object,Object>> events)
process events
|
protected void |
throwException(String errStr)
Utility method to write an Exception string to the Event Blackboard and
to also throw an exception containing the same string.
|
String |
toString(String methodName,
com.gemstone.gemfire.cache.asyncqueue.AsyncEvent event)
Return a string description of the GatewayEvent.
|
void |
updateSeenEvent(com.gemstone.gemfire.cache.asyncqueue.AsyncEvent event) |
static void |
waitForSilence(long desiredSilenceSec,
long sleepMS)
Return when no events have been invoked for the given number of seconds.
|
public static int lastEventTime
public int whereIWasRegistered
public boolean processEvents(List<com.gemstone.gemfire.cache.asyncqueue.AsyncEvent<Object,Object>> events)
public void init(Properties prop)
init in interface com.gemstone.gemfire.cache.Declarablepublic void close()
close in interface com.gemstone.gemfire.cache.CacheCallbackpublic boolean hasSeenEvent(com.gemstone.gemfire.cache.asyncqueue.AsyncEvent event)
event - The event object that was passed to the event.public void updateSeenEvent(com.gemstone.gemfire.cache.asyncqueue.AsyncEvent event)
protected void throwException(String errStr)
errStr - String to log, post to EventBB and throwTestException - containing the passed in Stringutil.TestHelper.checkForEventErrorpublic String logCall(String methodName, com.gemstone.gemfire.cache.asyncqueue.AsyncEvent event)
event - The event object that was passed to the event.public String toString(String methodName, com.gemstone.gemfire.cache.asyncqueue.AsyncEvent event)
event - The AsyncEvent object that was passed to the CqListenerpublic static void waitForSilence(long desiredSilenceSec,
long sleepMS)
sleepMS - The number of milliseonds to sleep between checks for
silence.Copyright © 2010-2015 Pivotal Software, Inc. All rights reserved.