Listeners receive notifications when a region is created or destroyed on another node. The methods on a CacheRegionListener are invoked asynchronously. Listeners are change notifications that are invoked AFTER the change has occured. Multiple events can cause concurrent invocation of CacheRegionListener methods. If event A occurs before event B, there is no guarantee that their corresponding CacheRegionListener 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 | |
| virtual void | afterRegionCreate (const char *path, void *clientData=NULL) |
| Handles the event of a new region being created on a server. | |
| virtual void | afterRegionDestroy (const char *path, void *clientData=NULL) |
| Handles the event of a region being destroyed. | |
| void | preserveSB () const |
| Atomically increment reference count. | |
| int32_t | refCount () |
| |
| void | releaseSB () const |
| Atomically decrement reference count, the SharedBase object is automatically deleted when its reference count goes to zero. | |
| virtual | ~CacheRegionListener () |
Protected Member Functions | |
| CacheRegionListener () | |
| virtual gemfire::CacheRegionListener::~CacheRegionListener | ( | ) | [virtual] |
public methods destructor
| gemfire::CacheRegionListener::CacheRegionListener | ( | ) | [protected] |
constructors
| virtual void gemfire::CacheRegionListener::afterRegionCreate | ( | const char * | path, | |
| void * | clientData = NULL | |||
| ) | [virtual] |
Handles the event of a new region being created on a server.
| path | denotes the region full path being created caller should not try to free path. | |
| clientData | optional client data |
| virtual void gemfire::CacheRegionListener::afterRegionDestroy | ( | const char * | path, | |
| void * | clientData = NULL | |||
| ) | [virtual] |
Handles the event of a region being destroyed.
| path | denotes the region path being destroyed | |
| clientData | optional client data |
| void gemfire::SharedBase::preserveSB | ( | ) | const [inherited] |
Atomically increment reference count.
| int32_t gemfire::SharedBase::refCount | ( | ) | [inline, inherited] |
| void gemfire::SharedBase::releaseSB | ( | ) | const [inherited] |
Atomically decrement reference count, the SharedBase object is automatically deleted when its reference count goes to zero.