|
GemFire 6.6.4 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.gemstone.gemfire.cache.util.CacheListenerAdapter<K,V>
public abstract class CacheListenerAdapter<K,V>
Utility class that implements all methods in CacheListener
with empty implementations. Applications can subclass this class and only
override the methods for the events of interest.
Subclasses declared in a Cache XML file, it must also implement Declarable
| Constructor Summary | |
|---|---|
CacheListenerAdapter()
|
|
| Method Summary | |
|---|---|
void |
afterCreate(EntryEvent<K,V> event)
Handles the event of new key being added to a region. |
void |
afterDestroy(EntryEvent<K,V> event)
Handles the event of an entry being destroyed. |
void |
afterInvalidate(EntryEvent<K,V> event)
Handles the event of an entry's value being invalidated. |
void |
afterRegionClear(RegionEvent<K,V> event)
Handles the event of a region being cleared. |
void |
afterRegionCreate(RegionEvent<K,V> event)
Handles the event of a region being created. |
void |
afterRegionDestroy(RegionEvent<K,V> event)
Handles the event of a region being destroyed. |
void |
afterRegionInvalidate(RegionEvent<K,V> event)
Handles the event of a region being invalidated. |
void |
afterRegionLive(RegionEvent<K,V> event)
Handles the event of a region being live after receiving the marker from the server. |
void |
afterUpdate(EntryEvent<K,V> event)
Handles the event of an entry's value being modified in a region. |
void |
close()
Called when the region containing this callback is closed or destroyed, when the cache is closed, or when a callback is removed from a region using an AttributesMutator. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CacheListenerAdapter()
| Method Detail |
|---|
public void afterCreate(EntryEvent<K,V> event)
CacheListener
afterCreate in interface CacheListener<K,V>event - the EntryEventRegion.create(Object, Object),
Region.put(Object, Object),
Region.get(Object)public void afterDestroy(EntryEvent<K,V> event)
CacheListener
afterDestroy in interface CacheListener<K,V>event - the EntryEventRegion.destroy(Object)public void afterInvalidate(EntryEvent<K,V> event)
CacheListener
afterInvalidate in interface CacheListener<K,V>event - the EntryEventRegion.invalidate(Object)public void afterRegionDestroy(RegionEvent<K,V> event)
CacheListenerafterRegionDestroyed event invoked on its listener.
afterRegionDestroy in interface CacheListener<K,V>event - the RegionEventRegion.destroyRegion(),
Region.localDestroyRegion(),
Region.close(),
RegionService.close()public void afterRegionCreate(RegionEvent<K,V> event)
CacheListenerNote that this method is only called
for creates done in the local vm. To be notified of creates done in remote
vms use RegionMembershipListener.afterRemoteRegionCreate(com.gemstone.gemfire.cache.RegionEvent.
afterRegionCreate in interface CacheListener<K,V>event - the RegionEventCache.createRegion(java.lang.String, com.gemstone.gemfire.cache.RegionAttributes) ,
Region.createSubregion(java.lang.String, com.gemstone.gemfire.cache.RegionAttributes) public void afterRegionInvalidate(RegionEvent<K,V> event)
CacheListenerregionInvalidated event invoked on its listener.
afterRegionInvalidate in interface CacheListener<K,V>event - the RegionEventRegion.invalidateRegion(),
Region.localInvalidateRegion()public void afterUpdate(EntryEvent<K,V> event)
CacheListener
afterUpdate in interface CacheListener<K,V>event - the EntryEventRegion.put(Object, Object)public void afterRegionClear(RegionEvent<K,V> event)
CacheListener
afterRegionClear in interface CacheListener<K,V>event - the RegionEventRegion.clear()public void afterRegionLive(RegionEvent<K,V> event)
CacheListener
afterRegionLive in interface CacheListener<K,V>event - the RegionEventCache.readyForEvents()public void close()
CacheCallbackAttributesMutator.
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.
close in interface CacheCallbackRegionService.close(),
Region.close(),
Region.localDestroyRegion(),
Region.destroyRegion(),
AttributesMutator
|
GemFire 6.6.4 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||