public abstract class TestCacheListener<K,V> extends TestCacheCallback implements CacheListener<K,V>
CacheListener used in testing. Its callback methods are implemented to thrown
UnsupportedOperationException unless the user overrides the "2" methods.TestCacheCallback.wasInvoked()callbackError| Constructor and Description |
|---|
TestCacheListener() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterCreate(EntryEvent<K,V> event)
Handles the event of new key being added to a region.
|
void |
afterCreate2(EntryEvent<K,V> event) |
void |
afterDestroy(EntryEvent<K,V> event)
Handles the event of an entry being destroyed.
|
void |
afterDestroy2(EntryEvent<K,V> event) |
void |
afterDestroyBeforeAddEvent(EntryEvent<K,V> event) |
void |
afterInvalidate(EntryEvent<K,V> event)
Handles the event of an entry's value being invalidated.
|
void |
afterInvalidate2(EntryEvent<K,V> event) |
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 |
afterRegionDestroy2(RegionEvent<K,V> event) |
void |
afterRegionDestroyBeforeAddEvent(RegionEvent<K,V> ignored) |
void |
afterRegionInvalidate(RegionEvent<K,V> event)
Handles the event of a region being invalidated.
|
void |
afterRegionInvalidate2(RegionEvent<K,V> event) |
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 |
afterUpdate2(EntryEvent<K,V> event) |
void |
disableEventHistory()
Disables collection of events.
|
void |
enableEventHistory()
Enables collection of event history.
|
java.util.List<CacheEvent<K,V>> |
getEventHistory()
Returns a copy of the list of events collected in this listener's history.
|
close, close2, isClosed, waitForInvocation, waitForInvocation, wasInvokedclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcloseinit, initializepublic void enableEventHistory()
public void disableEventHistory()
public java.util.List<CacheEvent<K,V>> getEventHistory()
public void afterCreate(EntryEvent<K,V> event)
CacheListenerafterCreate in interface CacheListener<K,V>event - the EntryEventRegion.create(Object, Object),
Region.put(Object, Object),
Region.get(Object)public void afterCreate2(EntryEvent<K,V> event)
public void afterUpdate(EntryEvent<K,V> event)
CacheListenerafterUpdate in interface CacheListener<K,V>event - the EntryEventRegion.put(Object, Object)public void afterUpdate2(EntryEvent<K,V> event)
public void afterInvalidate(EntryEvent<K,V> event)
CacheListenerafterInvalidate in interface CacheListener<K,V>event - the EntryEventRegion.invalidate(Object)public void afterInvalidate2(EntryEvent<K,V> event)
public void afterDestroy(EntryEvent<K,V> event)
CacheListenerafterDestroy in interface CacheListener<K,V>event - the EntryEventRegion.destroy(Object)public void afterDestroyBeforeAddEvent(EntryEvent<K,V> event)
public void afterDestroy2(EntryEvent<K,V> event)
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 afterRegionInvalidate2(RegionEvent<K,V> event)
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 afterRegionDestroyBeforeAddEvent(RegionEvent<K,V> ignored)
public void afterRegionDestroy2(RegionEvent<K,V> event)
public void afterRegionClear(RegionEvent<K,V> event)
CacheListenerafterRegionClear in interface CacheListener<K,V>event - the RegionEventRegion.clear()public void afterRegionCreate(RegionEvent<K,V> event)
CacheListener
Note 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(org.apache.geode.cache.RegionEvent<K, V>).
afterRegionCreate in interface CacheListener<K,V>event - the RegionEventCache.createRegion(java.lang.String, org.apache.geode.cache.RegionAttributes<K, V>),
Region.createSubregion(java.lang.String, org.apache.geode.cache.RegionAttributes<SK, SV>)public void afterRegionLive(RegionEvent<K,V> event)
CacheListenerafterRegionLive in interface CacheListener<K,V>event - the RegionEventCache.readyForEvents()