/** * This method is invoked after isDestroyed has been set to true */ protected void postDestroyRegion(boolean destroyDiskRegion, RegionEventImpl event) { if (this.diskRegion != null) { if (destroyDiskRegion) { this.diskRegion.endDestroy(this); } else { this.diskRegion.close(this); } } if (this.versionVector != null) { try { this.cache.getDistributionManager().removeMembershipListener(this.versionVector); } catch (CancelException e) { // ignore: cache close will remove the membership listener } } }
/** * This method is invoked after isDestroyed has been set to true */ protected void postDestroyRegion(boolean destroyDiskRegion, RegionEventImpl event) { if (this.diskRegion != null) { if (destroyDiskRegion) { this.diskRegion.endDestroy(this); } else { this.diskRegion.close(this); } } if (this.versionVector != null) { try { this.cache.getDistributionManager().removeMembershipListener(this.versionVector); } catch (CancelException e) { // ignore: cache close will remove the membership listener } } }
void cleanupFailedInitialization(LocalRegion region) { if (isRecreated() && !this.wasAboutToDestroy() && !this.wasAboutToDestroyDataStorage()) { close(region, isBucket()); } else { if(this.isBucket() && !this.wasAboutToDestroy()) { //Fix for 48642 //If this is a bucket, only destroy the data, if required. beginDestroyDataStorage(); } endDestroy(region); } } void prepareForClose(LocalRegion region) {
void cleanupFailedInitialization(LocalRegion region) { if (isRecreated() && !this.wasAboutToDestroy() && !this.wasAboutToDestroyDataStorage()) { close(region, isBucket()); } else { if(this.isBucket() && !this.wasAboutToDestroy()) { //Fix for 48642 //If this is a bucket, only destroy the data, if required. beginDestroyDataStorage(); } endDestroy(region); } } void prepareForClose(LocalRegion region) {
if(diskRegion != null) { diskRegion.beginDestroy(null); diskRegion.endDestroy(null);
assertEquals(true, dr.wasAboutToDestroy()); dr.endDestroy(lr); assertEquals(Collections.emptySet(), dr.getOnlineMembers()); assertEquals(Collections.emptySet(), dr.getOfflineMembers());
assertEquals(true, dr.wasAboutToDestroyDataStorage()); dr.endDestroy(lr); assertEquals(Collections.singleton(myOnId), dr.getOnlineMembers()); assertEquals(Collections.singleton(myOffId), dr.getOfflineMembers());
if(diskRegion != null) { diskRegion.beginDestroy(null); diskRegion.endDestroy(null);