@Override protected void appendFields(StringBuilder buff) { super.appendFields(buff); buff.append("; context=").append(this.clientID); }
@Override public List getOperations() { byte[] valueBytes = null; Object valueObj = null; if (this.newValueObj != null) { if (this.deserializationPolicy == DistributedCacheOperation.DESERIALIZATION_POLICY_EAGER) { valueObj = this.newValueObj; } else { valueBytes = EntryEventImpl.serialize(this.newValueObj); } } else { valueBytes = this.newValue; } return Collections.singletonList(new QueuedOperation(getOperation(), this.key, valueBytes, valueObj, this.deserializationPolicy, this.callbackArg)); }
buff.append("; key="); buff.append(this.key); if (this.hasDelta()) { byte[] bytes; if (this.event != null) {
registerDSFID(IP_ADDRESS, () -> new IpAddress()); registerDSFID(DISTRIBUTED_MEMBER, () -> new InternalDistributedMember()); registerDSFID(UPDATE_MESSAGE, () -> new UpdateOperation.UpdateMessage()); registerDSFID(REPLY_MESSAGE, () -> new ReplyMessage()); registerDSFID(PR_DESTROY, () -> new DestroyMessage());
if (hasDelta()) { DataSerializer.writeByteArray(this.event.getDeltaBytes(), out); this.event.getRegion().getCachePerfStats().incDeltasSent();
if (!(message.hasBridgeContext() && message.getDataPolicy() == DataPolicy.EMPTY)) { final UpdateMessage updateMsg; final DM dm = this.event.getRegion().getDistributionManager(); updateMsg = new UpdateOperation.UpdateMessage( this);
if (!(message.hasBridgeContext() && message.getDataPolicy() == DataPolicy.EMPTY)) { final UpdateMessage updateMsg; final DM dm = this.event.getRegion().getDistributionManager(); updateMsg = new UpdateOperation.UpdateMessage( (UpdateMessage)this);
if (hasDelta()) { this.deltaBytes = DataSerializer.readByteArray(in);
setDeltaFlag(region); super.toData(out); if (hasDelta()) { DataSerializer.writeByteArray(this.event.getDeltaBytes(), out); this.event.getRegion().getCachePerfStats().incDeltasSent();
@Override protected InternalCacheEvent createEvent(DistributedRegion rgn) throws EntryNotFoundException { EntryEventImpl ev = createEntryEvent(rgn); boolean evReturned = false; try { if (hasDelta()) { this.newValueObj = null; setNewValueInEvent(this.newValue, this.newValueObj, ev, this.deserializationPolicy);
if (hasDelta()) { this.deltaBytes = DataSerializer.readByteArray(in);
buff.append("; key="); buff.append(this.key); if (this.hasDelta()) { byte[] bytes; if (this.event != null) {
@Override protected InternalCacheEvent createEvent(DistributedRegion rgn) throws EntryNotFoundException { EntryEventImpl ev = createEntryEvent(rgn); boolean evReturned = false; try { if (hasDelta()) { this.newValueObj = null; setNewValueInEvent(this.newValue, this.newValueObj, ev, this.deserializationPolicy);
protected EntryEventImpl createEntryEvent(DistributedRegion rgn) { Object argNewValue = null; final boolean originRemote = true, generateCallbacks = true; if (rgn.keyRequiresRegionContext()) { final KeyWithRegionContext key = (KeyWithRegionContext)this.key; if (this.newValue != null) { key.afterDeserializationWithValue(this.newValue); } else if (!(this.newValueObj instanceof com.gemstone.gemfire.internal .cache.delta.Delta)) { key.afterDeserializationWithValue(this.newValueObj); } key.setRegionContext(rgn); } EntryEventImpl result = EntryEventImpl.create(rgn, getOperation(), this.key, argNewValue, // oldValue, this.callbackArg, originRemote, getSender(), generateCallbacks); setOldValueInEvent(result); result.setTailKey(this.tailKey); if (this.versionTag != null) { result.setVersionTag(this.versionTag); } return result; }
@Override final public EntryEventImpl createEntryEvent(final DistributedRegion rgn) { final EntryEventImpl ev = super.createEntryEvent(rgn); ev.setContext(this.clientID); return ev; /* // Object oldValue = null; final Object argNewValue = null; // boolean localLoad = false, netLoad = false, netSearch = false, // distributed = true; final boolean originRemote = true, generateCallbacks = true; if (rgn.keyRequiresRegionContext()) { ((KeyWithRegionContext)this.key).setRegionContext(rgn); } EntryEventImpl ev = new EntryEventImpl(rgn, getOperation(), this.key, argNewValue, this.callbackArg, originRemote, getSender(), generateCallbacks); ev.setContext(this.clientID); setOldValueInEvent(ev); return ev; // localLoad, netLoad, netSearch, // distributed, this.isExpiration, originRemote, this.context); */ }
@Override public List getOperations() { byte[] valueBytes = null; Object valueObj = null; if (this.newValueObj != null) { if (this.deserializationPolicy == DistributedCacheOperation.DESERIALIZATION_POLICY_EAGER) { valueObj = this.newValueObj; } else { valueBytes = EntryEventImpl.serialize(this.newValueObj); } } else { valueBytes = this.newValue; } return Collections.singletonList(new QueuedOperation(getOperation(), this.key, valueBytes, valueObj, this.deserializationPolicy, this.callbackArg)); }
protected EntryEventImpl createEntryEvent(DistributedRegion rgn) { Object argNewValue = null; final boolean originRemote = true, generateCallbacks = true; if (rgn.keyRequiresRegionContext()) { ((KeyWithRegionContext)this.key).setRegionContext(rgn); } EntryEventImpl result = EntryEventImpl.create(rgn, getOperation(), this.key, argNewValue, // oldValue, this.callbackArg, originRemote, getSender(), generateCallbacks); setOldValueInEvent(result); result.setTailKey(this.tailKey); if (this.versionTag != null) { result.setVersionTag(this.versionTag); } return result; }
@Override public ConflationKey getConflationKey() { if (!super.regionAllowsConflation || this.directAck || 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 { // only conflate if it is not a create // and we don't want an ack return new ConflationKey(this.key, super.regionPath, getOperation() .isUpdate()); } }
@Override public ConflationKey getConflationKey() { if (!super.regionAllowsConflation || this.directAck || 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 { // only conflate if it is not a create // and we don't want an ack return new ConflationKey(this.key, super.regionPath, getOperation() .isUpdate()); } }
@Override protected CacheOperationMessage createMessage() { EntryEventImpl ev = getEvent(); if (ev.isBridgeEvent()) { UpdateWithContextMessage mssgwithContxt = new UpdateWithContextMessage(); // getContext is not in EntryEvent interface because it exposes a private // class mssgwithContxt.clientID = ev.getContext(); return mssgwithContxt; } else { return new UpdateMessage(ev.getTXState()); } }