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,
this.callbackArg, originRemote, getSender(), generateCallbacks);
setOldValueInEvent(result);
result.setTailKey(this.tailKey);
if (this.versionTag != null) {
result.setVersionTag(this.versionTag);
}
return result;
}