after the change has occured.Listeners receive notifications when entries in a region change or changes occur to the region attributes themselves.
A cache listener is defined in the RegionAttributes.
The methods on a ICacheListener are invoked asynchronously. Multiple events can cause concurrent invocation of ICacheListener methods. If event A occurs before event B, there is no guarantee that their corresponding ICacheListener method invocations will occur in the same order. Any exceptions thrown by the listener are caught by GemFire and logged.
Listeners are user callbacks that are invoked by GemFire. It is important to ensure that minimal work is done in the listener before returning control back to GemFire. For example, a listener implementation may choose to hand off the event to a thread pool that then processes the event on its thread rather than the listener thread
Public Member Functions | |
| void | AfterCreate (EntryEvent^ ev) |
| void | AfterDestroy (EntryEvent^ ev) |
| void | AfterInvalidate (EntryEvent^ ev) |
| void | AfterRegionDestroy (RegionEvent^ ev) |
| void | AfterRegionInvalidate (RegionEvent^ ev) |
| void | AfterRegionLive (RegionEvent^ ev) |
| void | AfterUpdate (EntryEvent^ ev) |
| void | Close (Region^ region) |
| void GemStone::GemFire::Cache::ICacheListener::AfterCreate | ( | EntryEvent^ | ev | ) |
Handles the event of a new key being added to a region.
The entry did not previously exist in this region in the local cache (even with a null value).
This function does not throw any exception.
| ev | Denotes the event object associated with the entry creation. |
| void GemStone::GemFire::Cache::ICacheListener::AfterDestroy | ( | EntryEvent^ | ev | ) |
Handles the event of an entry being destroyed.
| ev | EntryEvent denotes the event object associated with the entry destruction. |
| void GemStone::GemFire::Cache::ICacheListener::AfterInvalidate | ( | EntryEvent^ | ev | ) |
Handles the event of an entry's value being invalidated.
| ev | EntryEvent denotes the event object associated with the entry invalidation. |
| void GemStone::GemFire::Cache::ICacheListener::AfterRegionDestroy | ( | RegionEvent^ | ev | ) |
Handles the event of a region being destroyed.
Events are not invoked for each individual entry that is destroyed as a result of the region being destroyed. Each subregion, however, gets its own AfterRegionDestroyed event invoked on its listener.
| ev | RegionEvent denotes the event object associated with the region destruction. |
| void GemStone::GemFire::Cache::ICacheListener::AfterRegionInvalidate | ( | RegionEvent^ | ev | ) |
Handles the event of a region being invalidated.
Events are not invoked for each individual value that is invalidated as a result of the region being invalidated. Each subregion, however, gets its own RegionInvalidated event invoked on its listener.
| ev | RegionEvent denotes the event object associated with the region invalidation. |
| void GemStone::GemFire::Cache::ICacheListener::AfterRegionLive | ( | RegionEvent^ | ev | ) |
Handles the event of a region going live.
Each subregion gets its own AfterRegionLive event invoked on its listener.
| ev | RegionEvent denotes the event object associated with the region going live. |
| void GemStone::GemFire::Cache::ICacheListener::AfterUpdate | ( | EntryEvent^ | ev | ) |
Handles the event of an entry's value being modified in a region.
This entry previously existed in this region in the local cache, but its previous value may have been null.
| ev | EntryEvent denotes the event object associated with updating the entry. |
| void GemStone::GemFire::Cache::ICacheListener::Close | ( | Region^ | region | ) |
Called when the region containing this callback is destroyed, when the cache is closed.
Implementations should clean up 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.