private void unlockRVVForBulkOp() { ARMLockTestHook testHook = getRegionMap().getARMLockTestHook(); if (testHook != null) { testHook.beforeBulkRelease(this); } if (this.versionVector != null && this.getDataPolicy().withReplication()) { this.versionVector.releaseCacheModificationLock(this); } if (testHook != null) { testHook.afterBulkRelease(this); } }
/** * releases the locks obtained in obtainWriteLocksForClear */ private void releaseWriteLocksForClear(RegionEventImpl regionEvent, Set<InternalDistributedMember> participants) { ARMLockTestHook armLockTestHook = getRegionMap().getARMLockTestHook(); if (armLockTestHook != null) { armLockTestHook.beforeRelease(this, regionEvent); } getVersionVector().unlockForClear(getMyId()); DistributedClearOperation.releaseLocks(regionEvent, participants); if (armLockTestHook != null) { armLockTestHook.afterRelease(this, regionEvent); } }
/** * bug #46924 - putAll can be partially applied when a clear() occurs, leaving the cache in an * inconsistent state. Set the RVV to "cache op in progress" so clear() will block until the * putAll completes. This won't work for non-replicate regions though since they uses one-hop * during basicPutPart2 to get a valid version tag. */ private void lockRVVForBulkOp() { ARMLockTestHook testHook = getRegionMap().getARMLockTestHook(); if (testHook != null) { testHook.beforeBulkLock(this); } if (this.versionVector != null && this.getDataPolicy().withReplication()) { this.versionVector.lockForCacheModification(this); } if (testHook != null) { testHook.afterBulkLock(this); } }
if (region.getRegionMap().getARMLockTestHook() != null) { region.getRegionMap().getARMLockTestHook().beforeStateFlushWait();
/** * pause local operations so that a clear() can be performed and flush comm channels to the given * member */ void lockLocallyForClear(DistributionManager dm, InternalDistributedMember locker, CacheEvent event) { RegionVersionVector rvv = getVersionVector(); ARMLockTestHook armLockTestHook = getRegionMap().getARMLockTestHook(); if (armLockTestHook != null) { armLockTestHook.beforeLock(this, event); } if (rvv != null) { // block new operations from being applied to the region map rvv.lockForClear(getFullPath(), dm, locker); // Check for region destroyed after we have locked, to make sure // we don't continue a clear if the region has been destroyed. checkReadiness(); // Only need to flush if NOACK at this point if (this.getAttributes().getScope().isDistributedNoAck()) { Set<InternalDistributedMember> members = getDistributionAdvisor().adviseCacheOp(); StateFlushOperation.flushTo(members, this); } } if (armLockTestHook != null) { armLockTestHook.afterLock(this, null); } }