If you execute the following C# code with GemFire Native Client, all the region entities in the client's local region are destroyed, as well as, those in the server side region.
regionObject.DestroyRegion();
Sometimes, however, you may want to destroy the client's local region only, without destroying the server side region. Prior to the introduction of the GemFire Native Client's Generic API, you could do this in C# code using the following, non-Generic API:
regionObject.DestroyLocalRegion();
However, this method does not exist in the Native Client Generic API, and the non-Generic API has been deprecated since Native Client 7.0.x. This article introduces how to accomplish the same behavior with the Native Client Generic API.
In order to destroy the only the client's local region using the Native Client Generic API, you must get a local view from the region object using the GetLocalView method. After that, you can simply destroy it using an approach like the following:
regionObject.GetLocalView().DestroyRegion();
Environment
Product | Version |
Native Client | 3.6.x or later version of Generic API |