public final boolean isInitialized() { if (this.region != null) { return this.region.isInitialized(); } else { return this.isIndexInitialized; } }
public final boolean isInitialized() { if (this.region != null) { return this.region.isInitialized(); } else { return this.isIndexInitialized; } }
public final boolean isInitialized() { if (this.region != null) { return this.region.isInitialized(); } else { return this.isIndexInitialized; } }
/** Test whether a local GII is in progress. Is more accurate than * isLocalGiiInProgress(). * * @param The region that may be in a getInitialImage * * @returns true if a GII is in progress for this VM, false otherwise. * */ protected static boolean isLocalGiiInProgress(Region aRegion) { if (aRegion == null) return false; boolean inProgress = !(((com.gemstone.gemfire.internal.cache.LocalRegion)aRegion).isInitialized()); return inProgress; }
/** Test whether a local GII is in progress. Is more accurate than * isLocalGiiInProgress(). * * @param The region that may be in a getInitialImage * * @returns true if a GII is in progress for this VM, false otherwise. * */ protected static boolean isLocalGiiInProgress(Region aRegion) { if (aRegion == null) return false; boolean inProgress = !(((com.gemstone.gemfire.internal.cache.LocalRegion)aRegion).isInitialized()); return inProgress; }
/** * Return true if invalidation occurred; false if it did not, for example if * it was already invalidated * * @see DistributedRegion#basicInvalidate(EntryEventImpl) */ void basicInvalidate(EntryEventImpl event) throws EntryNotFoundException { basicInvalidate(event, isInitialized()/* for bug 35214 */); }
/** * Return true if invalidation occurred; false if it did not, for example if * it was already invalidated * * @see DistributedRegion#basicInvalidate(EntryEventImpl) */ void basicInvalidate(EntryEventImpl event) throws EntryNotFoundException { basicInvalidate(event, isInitialized()/* for bug 35214 */); }
/** Return true if this region is initializing */ boolean isGlobalRegionInitializing(LocalRegion region) { boolean result = region != null && region.scope.isGlobal() && !region.isInitialized(); if (result) { if (logger.isDebugEnabled()) { logger.debug("GemFireCache.isGlobalRegionInitializing ({})", region.getFullPath()); } } return result; }
/** * Return the number of subregions, including this region. Used for recursive * size calculation in SubregionsSet.size */ protected int allSubregionsSize() { int sz = 1; /* 1 for this region */ for (Iterator itr = this.subregions.values().iterator(); itr.hasNext();) { LocalRegion r = (LocalRegion)itr.next(); if (r != null && r.isInitialized() && !r.isDestroyed()) { sz += r.allSubregionsSize(); } } return sz; }
/** * Return the number of subregions, including this region. Used for recursive * size calculation in SubregionsSet.size */ protected int allSubregionsSize() { int sz = 1; /* 1 for this region */ for (Iterator itr = this.subregions.values().iterator(); itr.hasNext();) { LocalRegion r = (LocalRegion)itr.next(); if (r != null && r.isInitialized() && !r.isDestroyed()) { sz += r.allSubregionsSize(); } } return sz; }
public void afterRegionCreate(RegionEvent event) { Region region = event.getRegion(); if (((LocalRegion) region).isInitialized()) { String regionPath = event.getRegion().getFullPath(); if (regionPath.indexOf("/testRegion/testSubRegion") >= 0) { flags[1] = true; } else if (regionPath.indexOf("/testRegion") >= 0) { flags[0] = true; } } if(flags[0] && flags[1]){ isOK = true; synchronized (Bug33726JUnitTest.class) { Bug33726JUnitTest.class.notify(); } } } }
public void afterRegionCreate(RegionEvent event) { Region region = event.getRegion(); if (((LocalRegion) region).isInitialized()) { String regionPath = event.getRegion().getFullPath(); if (regionPath.indexOf("/testRegion/testSubRegion") >= 0) { flags[1] = true; } else if (regionPath.indexOf("/testRegion") >= 0) { flags[0] = true; } } if(flags[0] && flags[1]){ isOK = true; synchronized(Bug33726DUnitTest.class){ Bug33726DUnitTest.class.notify(); } } } }
public void afterInvalidate(EntryEvent e) { callbackAssertTrue("afterregionCreate not seen", afterRegionCreateSeen); // make sure region is initialized callbackAssertTrue("not initialized", ((LocalRegion)e.getRegion()).isInitialized()); expirationCount++; com.gemstone.gemfire.internal.cache.InitialImageOperation.slowImageProcessing = 0; } };
private boolean continueOverwriteDestroyed(RegionEntry re, EntryEventImpl event, boolean overwriteDestroyed, boolean ifNew) { Token oldValueInVM = re.getValueAsToken(); // if region is under GII, check if token is destroyed if (!overwriteDestroyed) { if (!_getOwner().isInitialized() && (oldValueInVM == Token.DESTROYED || oldValueInVM == Token.TOMBSTONE)) { event.setOldValueDestroyedToken(); return false; } } if (ifNew && !Token.isRemoved(oldValueInVM)) { return false; } return true; }
private boolean continueOverwriteDestroyed(RegionEntry re, EntryEventImpl event, boolean overwriteDestroyed, boolean ifNew) { Token oldValueInVM = re.getValueAsToken(); // if region is under GII, check if token is destroyed if (!overwriteDestroyed) { if (!_getOwner().isInitialized() && (oldValueInVM == Token.DESTROYED || oldValueInVM == Token.TOMBSTONE)) { event.setOldValueDestroyedToken(); return false; } } if (ifNew && !Token.isRemoved(oldValueInVM)) { return false; } return true; }
/** Return true if this region is initializing */ final boolean isGlobalRegionInitializing(LocalRegion region) { boolean result = region != null && region.scope.isGlobal() && !region.isInitialized(); if (result) { LogWriterI18n logger = getLoggerI18n(); if (logger.fineEnabled()) { logger.fine("GemFireCache.isGlobalRegionInitializing (" + region.getFullPath() + ")"); } } return result; }
/** @return whether we should do a local create for a remote one */ private static final boolean shouldDoRemoteCreate(LocalRegion rgn, EntryEventImpl ev, final boolean nonTX) { DataPolicy dp = rgn.getAttributes().getDataPolicy(); if (!rgn.isAllEvents() || (dp.withReplication() && rgn.isInitialized() && (nonTX && ev.getOperation().isUpdate()) && !rgn.concurrencyChecksEnabled // misordered CREATE and UPDATE messages can cause inconsistencies && !ALWAYS_REPLICATE_UPDATES)) { // we are not accepting all events // or we are a replicate and initialized and it was an update // (we exclude that latter to avoid resurrecting a key deleted in a replicate return false; } else { return true; } }
/** @return whether we should do a local create for a remote one */ private static final boolean shouldDoRemoteCreate(LocalRegion rgn, EntryEventImpl ev) { DataPolicy dp = rgn.getAttributes().getDataPolicy(); if (!rgn.isAllEvents() || (dp.withReplication() && rgn.isInitialized() && ev.getOperation().isUpdate() && !rgn.concurrencyChecksEnabled // misordered CREATE and UPDATE messages can cause inconsistencies && !ALWAYS_REPLICATE_UPDATES)) { // we are not accepting all events // or we are a replicate and initialized and it was an update // (we exclude that latter to avoid resurrecting a key deleted in a replicate return false; } else { return true; } } /**
protected void createEntry(EntryEventImpl event, final LocalRegion owner, RegionEntry re) throws RegionClearedException { final boolean wasTombstone = re.isTombstone(); processVersionTag(re, event); event.putNewEntry(owner, re); updateSize(event, 0, false, wasTombstone); if (!event.getLocalRegion().isInitialized()) { owner.getImageState().removeDestroyedEntry(event.getKey()); } }
protected void createEntry(EntryEventImpl event, final LocalRegion owner, RegionEntry re) throws RegionClearedException { final boolean wasTombstone = re.isTombstone(); processVersionTag(re, event); event.putNewEntry(owner, re); updateSize(event, 0, false, wasTombstone); if (!event.getLocalRegion().isInitialized()) { owner.getImageState().removeDestroyedEntry(event.getKey()); } }