/** * Provide recipient information for an update or create operation. * */ Set adviseUpdate(final EntryEventImpl event) throws IllegalStateException { if (event.hasNewValue() || event.getOperation().isPutAll()) { // only need to distribute it to members that want all events or cache data return adviseAllEventsOrCached(true/* fixes 41147 */); } else { // The new value is null so this is a create with a null value, // in which case we only need to distribute this message to replicates // or all events that are not a proxy or if a proxy has a listener return adviseFilter(new Filter() { @Override public boolean include(Profile profile) { assert profile instanceof CacheProfile; CacheProfile cp = (CacheProfile) profile; DataPolicy dp = cp.dataPolicy; return dp.withReplication() || (cp.allEvents() && (dp.withStorage() || cp.hasCacheListener)); } }); } }
PutMessage(Set recipients, boolean notifyOnly, int regionId, DirectReplyProcessor processor, EntryEventImpl event, final long lastModified, boolean ifNew, boolean ifOld, Object expectedOldValue, boolean requireOldValue) { super(recipients, regionId, processor, event); this.processor = processor; this.notificationOnly = notifyOnly; this.requireOldValue = requireOldValue; this.expectedOldValue = expectedOldValue; this.key = event.getKey(); if (event.hasNewValue()) { this.deserializationPolicy = DistributedCacheOperation.DESERIALIZATION_POLICY_LAZY; event.exportNewValue(this); } else { // assert that if !event.hasNewValue, then deserialization policy is NONE assert this.deserializationPolicy == DistributedCacheOperation.DESERIALIZATION_POLICY_NONE : this.deserializationPolicy; } this.event = event; this.cbArg = event.getRawCallbackArgument(); this.lastModified = lastModified; this.op = event.getOperation(); this.bridgeContext = event.getContext(); this.eventId = event.getEventId(); this.versionTag = event.getVersionTag(); Assert.assertTrue(this.eventId != null); this.ifNew = ifNew; this.ifOld = ifOld; }
if (event.hasNewValue()) { this.deserializationPolicy = DistributedCacheOperation.DESERIALIZATION_POLICY_LAZY; event.exportNewValue(this);
if (event.hasNewValue() && !isMemoryThresholdReachedForLoad()) { putNewValueInRegion(isCreate, clientEvent, lastModified, event); } else if (isCreate) {