LATEST VERSION: 8.1.0 - CHANGELOG
Pivotal GemFire® v8.1

helloworld/SimpleCacheListener.java

helloworld/SimpleCacheListener.java

SimpleCacheListener.java is a Java application plug-in written to handle cache region events.

You can code application plug-ins to respond to a variety of events in the GemFire system. This listener is installed on the region in both applications, through the XML file declarations.

SimpleCacheListener, afterCreate, and afterUpdate Callbacks

The following code is called when the entry is put into the cache.

public void afterCreate(EntryEvent<K,V> e) {
    System.out.println("    Received afterCreate event for entry: " +
        e.getKey() + ", " + e.getNewValue());
}
public void afterUpdate(EntryEvent<K,V> e) {
    System.out.println("    Received afterUpdate event for entry: " +
        e.getKey() + ", " + e.getNewValue());
}