/** * Called by lower levels, while still holding the write sync lock, and the low level has * completed its part of the basic destroy */ void txApplyDestroyPart2(RegionEntry re, Object key, boolean inTokenMode, boolean clearConflict, boolean alreadyDestroyedOrRemoved) { if (this.testCallable != null) { this.testCallable.call(this, Operation.DESTROY, re); } if (inTokenMode) { getImageState().addDestroyedEntry(key); } else if (!alreadyDestroyedOrRemoved) { updateStatsForDestroy(); } if (this.entryUserAttributes != null) { this.entryUserAttributes.remove(key); } }
is.lockGII(); is.getVersionTags(); is.getLeftMembers(); RegionVersionVector rvv = is.getClearRegionVersionVector(); try { Iterator/* <Object> */ keysIt = getImageState().getDestroyedEntries(); while (keysIt.hasNext()) { this.entries.removeIfDestroyed(keysIt.next()); releaseAfterGetInitialImageLatch(); } finally { // make sure unlockGII is done for bug 40001 is.unlockGII();
/** * @return size after considering imageState */ @Override public int getRegionSize() { synchronized (getSizeGuard()) { int result = getRegionMap().size(); // if this is a client with no tombstones then we subtract the number // of entries being affected by register-interest refresh if (this.imageState.isClient() && !this.getConcurrencyChecksEnabled()) { return result - this.imageState.getDestroyedEntriesCount(); } return result - this.tombstoneCount.get(); } }
if (this.region.getConcurrencyChecksEnabled() && rvv != null) { ImageState state = this.region.getImageState(); if (state.hasLeftMembers()) { Set<VersionSource> needsSync = null; Set<VersionSource> leftMembers = state.getLeftMembers(); Iterator<ImageState.VersionTagEntry> tags = state.getVersionTags(); while (tags.hasNext()) { ImageState.VersionTagEntry tag = tags.next();
if (imageState.getRegionInvalidated()) { if (newValueToWrite != Token.TOMBSTONE) { newValueToWrite = Token.INVALID; } else if (imageState.getClearRegionFlag()) { boolean entryOK = false; RegionVersionVector rvv = imageState.getClearRegionVersionVector(); if (rvv != null) { // a filtered clear VersionSource id = getVersionStamp().getMemberID(); imageState.addDestroyedEntry(this.getKey()); throw new RegionClearedException( "During the GII put of entry, the region got cleared so aborting the operation");
ImageState imgState = region.getImageState(); if (imgState.getClearRegionFlag()) { imgState.setClearRegionFlag(false, null);
getImageState().getLeftMembers(); getImageState().getVersionTags();
if (rgn.getImageState().getInRecovery()) { return;
/** * removes any destroyed entries from the region and clear the destroyedKeys assert: Caller must * be holding writeLock on is */ private void destroyEntriesAndClearDestroyedKeysSet() { ImageState is = getImageState(); Iterator iter = is.getDestroyedEntries(); while (iter.hasNext()) { Object key = iter.next(); // destroy the entry which has value Token.DESTROYED // If it is Token.DESTROYED then only destroy it. this.entries.removeIfDestroyed(key); // fixes bug 41957 } }
if (isPersistent) { if (persistentId != null) { state.addLeftMember(persistentId); state.addLeftMember((InternalDistributedMember) memberId);
/** * Process an incoming version tag for concurrent operation detection. This must be done before * modifying the region entry. * * @param regionEntry the entry that is to be modified * @param event the modification to the entry * @throws InvalidDeltaException if the event contains a delta that cannot be applied * @throws ConcurrentCacheModificationException if the event is in conflict with a previously * applied change */ @Override public void processVersionTag(RegionEntry regionEntry, EntryEventImpl event) { if (regionEntry.getVersionStamp() != null) { regionEntry.getVersionStamp().processVersionTag(event); // during initialization we record version tag info to detect ops the // image provider hasn't seen VersionTag<?> tag = event.getVersionTag(); if (tag != null && !event.getRegion().isInitialized()) { ImageState is = event.getRegion().getImageState(); if (is != null && !event.getRegion().isUsedForPartitionedRegionBucket()) { if (logger.isTraceEnabled()) { logger.trace("recording version tag in image state: {}", tag); } is.addVersionTag(event.getKey(), tag); } } } }
if (this.region.isDestroyed() || imgState.getClearRegionFlag()) { return false;
processor.waitForRepliesUninterruptibly(); ImageState imgState = region.getImageState(); if (imgState.getClearRegionFlag()) { imgState.setClearRegionFlag(false, null);
Assert.assertTrue(this.scope.isDistributed()); cacheProfile.scope = this.scope; cacheProfile.inRecovery = getImageState().getInRecovery(); cacheProfile.isPersistent = getDataPolicy().withPersistence(); cacheProfile.setSubscriptionAttributes(getSubscriptionAttributes());
getImageState().addDestroyedEntry(event.getKey()); if (!(this instanceof HARegion)) { if (logger.isTraceEnabled()) {