public class WANCacheListener<K,V>
extends com.gemstone.gemfire.cache.util.CacheListenerAdapter<K,V>
implements com.gemstone.gemfire.cache.Declarable
WANCacheListener is a CacheListener that logs
WAN events as they are received.| Modifier and Type | Field and Description |
|---|---|
protected int |
_numberOfEvents
Counter tracking the number of events received
|
| Constructor and Description |
|---|
WANCacheListener() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterCreate(com.gemstone.gemfire.cache.EntryEvent<K,V> event)
Processes an afterCreate event.
|
void |
afterDestroy(com.gemstone.gemfire.cache.EntryEvent<K,V> event)
Processes an afterDestroy event.
|
void |
afterInvalidate(com.gemstone.gemfire.cache.EntryEvent<K,V> event)
Processes an afterInvalidate event.
|
void |
afterUpdate(com.gemstone.gemfire.cache.EntryEvent<K,V> event)
Processes an afterUpdate event.
|
void |
init(Properties p)
Initializes this
WANCacheListener. |
protected void |
processEvent(String operation,
com.gemstone.gemfire.cache.EntryEvent<K,V> event)
Processes an event by incrementing the number of events received and logging
the event's key and new value.
|
protected int _numberOfEvents
public void afterCreate(com.gemstone.gemfire.cache.EntryEvent<K,V> event)
public void afterUpdate(com.gemstone.gemfire.cache.EntryEvent<K,V> event)
public void afterDestroy(com.gemstone.gemfire.cache.EntryEvent<K,V> event)
public void afterInvalidate(com.gemstone.gemfire.cache.EntryEvent<K,V> event)
public void init(Properties p)
WANCacheListener.init in interface com.gemstone.gemfire.cache.Declarablep - The Properties with which to initialize this
WANCacheListenerprotected void processEvent(String operation, com.gemstone.gemfire.cache.EntryEvent<K,V> event)
operation - The EntryEvent's operation (afterCreate, afterUpdate,
afterDestroy, afterInvalidate)event - The EntryEvent receivedCopyright © 2010-2015 Pivotal Software, Inc. All rights reserved.