/** obtain locks preventing generation of new versions in other members * @param participants **/ private void obtainWriteLocksForClear(RegionEventImpl regionEvent, Set<InternalDistributedMember> participants) { lockLocallyForClear(getDistributionManager(), getMyId()); DistributedClearOperation.lockAndFlushToOthers(regionEvent, participants); }
/** releases the locks obtained in obtainWriteLocksForClear * @param participants */ private void releaseWriteLocksForClear(RegionEventImpl regionEvent, Set<InternalDistributedMember> participants) { getVersionVector().unlockForClear(getMyId()); DistributedClearOperation.releaseLocks(regionEvent, participants); }
/** obtain locks preventing generation of new versions in other members * @param participants **/ private void obtainWriteLocksForClear(RegionEventImpl regionEvent, Set<InternalDistributedMember> participants) { lockLocallyForClear(getDistributionManager(), getMyId()); DistributedClearOperation.lockAndFlushToOthers(regionEvent, participants); }
public static DistributedTombstoneOperation gc(DistributedRegion region, EventID eventId) { RegionEventImpl rev = new RegionEventImpl(region, Operation.REGION_EXPIRE_DESTROY, null, false, region.getMyId()); rev.setEventID(eventId); DistributedTombstoneOperation top = new DistributedTombstoneOperation(rev); top.op = TOperation.GC; return top; }
public static DistributedTombstoneOperation gc(DistributedRegion region, EventID eventId) { RegionEventImpl rev = new RegionEventImpl(region, Operation.REGION_EXPIRE_DESTROY, null, false, region.getMyId()); rev.setEventID(eventId); DistributedTombstoneOperation top = new DistributedTombstoneOperation(rev); top.op = TOperation.GC; return top; }
/** releases the locks obtained in obtainWriteLocksForClear * @param participants */ private void releaseWriteLocksForClear(RegionEventImpl regionEvent, Set<InternalDistributedMember> participants) { getVersionVector().unlockForClear(getMyId()); DistributedClearOperation.releaseLocks(regionEvent, participants); }
@Override protected InternalCacheEvent createEvent(DistributedRegion rgn) throws EntryNotFoundException { RegionEventImpl event = createRegionEvent(rgn); event.setEventID(this.eventID); if (this.filterRouting != null) { event.setLocalFilterInfo(this.filterRouting .getFilterInfo(rgn.getMyId())); } return event; }
@Override protected InternalCacheEvent createEvent(DistributedRegion rgn) throws EntryNotFoundException { RegionEventImpl event = createRegionEvent(rgn); event.setEventID(this.eventID); if (this.filterRouting != null) { event.setLocalFilterInfo(this.filterRouting .getFilterInfo(rgn.getMyId())); } return event; }
@Override protected InternalCacheEvent createEvent(DistributedRegion rgn) throws EntryNotFoundException { RegionEventImpl event = createRegionEvent(rgn); if (this.filterRouting != null) { event.setLocalFilterInfo(this.filterRouting .getFilterInfo(rgn.getMyId())); } event.setEventID(this.eventID); return event; }
@Override protected InternalCacheEvent createEvent(DistributedRegion rgn) throws EntryNotFoundException { RegionEventImpl event = createRegionEvent(rgn); if (this.filterRouting != null) { event.setLocalFilterInfo(this.filterRouting .getFilterInfo((InternalDistributedMember)rgn.getMyId())); } event.setEventID(this.eventID); return event; }
@Override protected boolean operateOnRegion(CacheEvent event, DistributionManager dm) throws EntryNotFoundException { boolean sendReply = true; DistributedRegion region = (DistributedRegion) event.getRegion(); region.getCachePerfStats().incTombstoneGCCount(); FilterInfo routing = null; if (this.filterRouting != null) { routing = this.filterRouting.getFilterInfo(region.getMyId()); } region.expireTombstones(this.regionGCVersions, this.eventID, routing); this.appliedOperation = true; return sendReply; }
@Override protected boolean operateOnRegion(CacheEvent event, DistributionManager dm) throws EntryNotFoundException { boolean sendReply = true; DistributedRegion region = (DistributedRegion) event.getRegion(); region.getCachePerfStats().incTombstoneGCCount(); FilterInfo routing = null; if (this.filterRouting != null) { routing = this.filterRouting.getFilterInfo(region.getMyId()); } region.expireTombstones(this.regionGCVersions, this.eventID, routing); this.appliedOperation = true; return sendReply; }
@Override protected InternalCacheEvent createEvent(DistributedRegion rgn) throws EntryNotFoundException { RegionEventImpl event = new RegionEventImpl(rgn, getOperation(), this.callbackArg, true, getSender()); event.setEventID(this.eventID); if (this.filterRouting != null) { event.setLocalFilterInfo(this.filterRouting .getFilterInfo(rgn.getMyId())); } return event; }
@Override void cleanupFailedInitialization() { super.cleanupFailedInitialization(); try { RegionEventImpl ev = new RegionEventImpl(this, Operation.REGION_CLOSE, null, false, getMyId(), generateEventID()); distributeDestroyRegion(ev, true); distributedRegionCleanup(null); } catch(RegionDestroyedException e) { //someone else must have concurrently destroyed the region (maybe a distributed destroy) } catch(CancelException e) { //cache or DS is closed, ignore } catch(VirtualMachineError e) { SystemFailure.initiateFailure(e); throw e; } catch(Throwable t) { logger.warn(LocalizedMessage.create(LocalizedStrings.DistributedRegion_ERROR_CLEANING_UP_FAILED_INITIALIZATION, this), t); } }
@Override protected InternalCacheEvent createEvent(DistributedRegion rgn) throws EntryNotFoundException { RegionEventImpl event = new RegionEventImpl(rgn, getOperation(), this.callbackArg, true, getSender()); event.setEventID(this.eventID); if (this.filterRouting != null) { event.setLocalFilterInfo(this.filterRouting .getFilterInfo((InternalDistributedMember)rgn.getMyId())); } return event; }
@Override protected InternalCacheEvent createEvent(DistributedRegion rgn) throws EntryNotFoundException { if (rgn.keyRequiresRegionContext()) { ((KeyWithRegionContext)this.key).setRegionContext(rgn); } EntryEventImpl ev = EntryEventImpl.create( rgn, getOperation(), this.key, null, this.callbackArg, true, getSender()); ev.setEventId(this.eventId); setOldValueInEvent(ev); ev.setVersionTag(this.versionTag); if (this.filterRouting != null) { ev.setLocalFilterInfo(this.filterRouting .getFilterInfo(rgn.getMyId())); } ev.setInhibitAllNotifications(this.inhibitAllNotifications); return ev; }
@Override protected InternalCacheEvent createEvent(DistributedRegion rgn) throws EntryNotFoundException { if (rgn.keyRequiresRegionContext()) { ((KeyWithRegionContext)this.key).setRegionContext(rgn); } EntryEventImpl ev = EntryEventImpl.create( rgn, getOperation(), this.key, null, this.callbackArg, true, getSender()); ev.setEventId(this.eventId); setOldValueInEvent(ev); ev.setVersionTag(this.versionTag); if (this.filterRouting != null) { ev.setLocalFilterInfo(this.filterRouting .getFilterInfo(rgn.getMyId())); } ev.setInhibitAllNotifications(this.inhibitAllNotifications); return ev; }
@Override public void cleanupFailedInitialization() { super.cleanupFailedInitialization(); try { RegionEventImpl ev = new RegionEventImpl(this, Operation.REGION_CLOSE, null, false, getMyId(), generateEventID()); distributeDestroyRegion(ev, true); distributedRegionCleanup(null); } catch(RegionDestroyedException e) { //someone else must have concurrently destroyed the region (maybe a distributed destroy) } catch(CancelException e) { //cache or DS is closed, ignore } catch(Throwable t) { Error err; if (t instanceof Error && SystemFailure.isJVMFailureError( err = (Error)t)) { SystemFailure.initiateFailure(err); // If this ever returns, rethrow the error. We're poisoned // now, so don't let this thread continue. throw err; } getCache().getLoggerI18n().warning(LocalizedStrings.DistributedRegion_ERROR_CLEANING_UP_FAILED_INITIALIZATION, this, t); } }
@Override protected final InternalCacheEvent createEvent(DistributedRegion rgn) throws EntryNotFoundException { if (rgn.keyRequiresRegionContext()) { ((KeyWithRegionContext)this.key).setRegionContext(rgn); } EntryEventImpl ev = createEntryEvent(rgn); boolean evReturned = false; try { ev.setEventId(this.eventId); ev.setOldValueFromRegion(); ev.setVersionTag(this.versionTag); if (this.filterRouting != null) { ev.setLocalFilterInfo(this.filterRouting .getFilterInfo(rgn.getMyId())); } ev.setTailKey(tailKey); ev.setInhibitAllNotifications(this.inhibitAllNotifications); evReturned = true; return ev; } finally { if (!evReturned) { ev.release(); } } }
.getFilterInfo(rgn.getMyId()));