@Override protected void appendFields(StringBuilder buff) { super.appendFields(buff); buff.append("; membershipID="); buff.append(this.context == null ? "" : this.context.toString()); }
dispatchElidedEvent(rgn, ev); return true; // concurrent modifications are not reported to the sender dispatchElidedEvent(rgn, ev); if (!ev.isConcurrencyConflict()) { rgn.notifyGatewaySender(EnumListenerEvent.AFTER_DESTROY, ev);
@Override public List getOperations() { return Collections.singletonList(new QueuedOperation(getOperation(), this.key, null, null, DistributedCacheOperation .DESERIALIZATION_POLICY_NONE, this.callbackArg)); }
registerDSFID(INVALIDATE_MESSAGE, () -> new InvalidateOperation.InvalidateMessage()); registerDSFID(DESTROY_MESSAGE, () -> new DestroyOperation.DestroyMessage()); registerDSFID(DA_PROFILE, () -> new DistributionAdvisor.Profile()); registerDSFID(CACHE_PROFILE,
TXManagerImpl txMgr = null; TXManagerImpl.TXContext context = null; if (getLockingPolicy() == LockingPolicy.SNAPSHOT) { txMgr = rgn.getCache().getTxManager(); context = txMgr.masqueradeAs(this, false, true); ev.setTXState(getTXState()); dispatchElidedEvent(rgn, ev); return true; // concurrent modifications are not reported to the sender dispatchElidedEvent(rgn, ev); throw new Error(LocalizedStrings.DestroyOperation_DISTRIBUTEDLOCK_SHOULD_NOT_BE_ACQUIRED.toLocalizedString(), e); } finally { if (getLockingPolicy() == LockingPolicy.SNAPSHOT) { txMgr.unmasquerade(context, true);
@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.setLoadedFromHDFS(this.isLoadedFromHDFS); ev.setTailKey(tailKey); ev.setInhibitAllNotifications(this.inhibitAllNotifications); evReturned = true; return ev; } finally { if (!evReturned) { ev.release(); } } }
@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(); } } }
@Override public ConflationKey getConflationKey() { if (!super.regionAllowsConflation || getProcessorId() != 0) { // if the publisher's region attributes do not support conflation // or if it is an ack region // then don't even bother with a conflation key return null; } else { // don't conflate destroys return new ConflationKey(this.key, super.regionPath, false); } } @Override
@Override public ConflationKey getConflationKey() { if (!super.regionAllowsConflation || getProcessorId() != 0) { // if the publisher's region attributes do not support conflation // or if it is an ack region // then don't even bother with a conflation key return null; } else { // don't conflate destroys return new ConflationKey(this.key, super.regionPath, false); } } }
@Override public void toData(DataOutput out) throws IOException { super.toData(out); DataSerializer.writeObject(this.context, out); }
@Override public void toData(DataOutput out) throws IOException { super.toData(out); DataSerializer.writeObject(this.context, out); } }
EntryEventImpl createEntryEvent(DistributedRegion rgn) { EntryEventImpl event = EntryEventImpl.create(rgn, getOperation(), this.key, null, this.callbackArg, true, getSender()); // event.setNewEventId(); Don't set the event here... setOldValueInEvent(event); event.setTailKey(this.tailKey); return event; }
@Override public List getOperations() { return Collections.singletonList(new QueuedOperation(getOperation(), this.key, null, null, DistributedCacheOperation .DESERIALIZATION_POLICY_NONE, this.callbackArg)); }
@Override protected void appendFields(StringBuilder buff) { super.appendFields(buff); buff.append("; membershipID="); buff.append(this.context == null ? "" : this.context.toString()); }
@Override public void fromData(DataInput in) throws IOException, ClassNotFoundException { super.fromData(in); this.context = ClientProxyMembershipID.readCanonicalized(in); }
@Override public void fromData(DataInput in) throws IOException, ClassNotFoundException { super.fromData(in); this.context = ClientProxyMembershipID.readCanonicalized(in); }
@Override protected CacheOperationMessage createMessage() { if (this.event.hasClientOrigin()) { DestroyWithContextMessage msgwithContxt = new DestroyWithContextMessage(event); msgwithContxt.context = ((EntryEventImpl)this.event).getContext(); return msgwithContxt; } else { return new DestroyMessage(event); } }
EntryEventImpl createEntryEvent(DistributedRegion rgn) { EntryEventImpl event = EntryEventImpl.create(rgn, getOperation(), this.key, null, this.callbackArg, true, getSender()); // event.setNewEventId(); Don't set the event here... setOldValueInEvent(event); event.setLoadedFromHDFS(this.isLoadedFromHDFS); event.setTailKey(this.tailKey); return event; }
@Override protected CacheOperationMessage createMessage() { if (this.event.hasClientOrigin()) { DestroyWithContextMessage msgwithContxt = new DestroyWithContextMessage(event); msgwithContxt.context = ((EntryEventImpl)this.event).getContext(); return msgwithContxt; } else { return new DestroyMessage(event); } }