public PartitionMessageWithDirectReply(Set recipients, int regionId, DirectReplyProcessor processor, EntryEventImpl event) { super(recipients, regionId, processor); this.processor = processor; this.posDup = event.isPossibleDuplicate(); }
public PartitionMessageWithDirectReply(Set recipients, int regionId, DirectReplyProcessor processor, EntryEventImpl event, TXStateInterface tx) { super(recipients, regionId, processor, tx); this.processor = processor; this.posDup = event.isPossibleDuplicate(); }
/** * @param original */ public PartitionMessageWithDirectReply( PartitionMessageWithDirectReply original, EntryEventImpl event) { super(original); this.processor = original.processor; if (event != null) { this.posDup = event.isPossibleDuplicate(); } else { this.posDup = original.posDup; } }
public boolean isPossibleDuplicate() { return this.entryEvent.isPossibleDuplicate(); }
public final boolean isFromBridgeOrPossDupAndVersioned() { return (this.context != null || (this.isPossibleDuplicate() && this.eventID != null)) && (this.versionTag != null); }
/** * @param original */ public PartitionMessageWithDirectReply( PartitionMessageWithDirectReply original, EntryEventImpl event) { super(original); this.processor = original.processor; if (event != null) { this.posDup = event.isPossibleDuplicate(); } else { this.posDup = original.posDup; } }
public boolean isPossibleDuplicate() { return this.entryEvent.isPossibleDuplicate(); }
public boolean isPossibleDuplicate() { return this.entryEvent.isPossibleDuplicate(); }
protected DestroyMessage(InternalDistributedMember recipient, boolean notifyOnly, int regionId, DirectReplyProcessor processor, EntryEventImpl event, TXStateInterface tx, Object expectedOldValue, boolean cacheWrite) { super(recipient, regionId, processor, tx); this.posDup = event.isPossibleDuplicate(); initialize(notifyOnly, event, expectedOldValue, cacheWrite); }
/** a cloning constructor for relaying the message to listeners */ DestroyMessage(DestroyMessage original, EntryEventImpl event, Set members) { this(original); if (event != null) { this.posDup = event.isPossibleDuplicate(); this.versionTag = event.getVersionTag(); } }
public DistributedPutAllOperation(final LocalRegion r, final EntryEventImpl event, int size, boolean isBridgeOp, PutAllEntryData[] paed) { this(r, event, size, isBridgeOp); boolean isPosDup = event.isPossibleDuplicate(); this.callbackArgs = new Object[size]; for (int i = 0; i < size; ++i) { this.callbackArgs[i] = paed[i].callbackArg; if (isPosDup) { paed[i].setPossibleDuplicate(true); } } }
/** a cloning constructor for relaying the message to listeners */ DestroyMessage(DestroyMessage original, EntryEventImpl event, Set members) { this(original); if (event != null) { this.posDup = event.isPossibleDuplicate(); this.versionTag = event.getVersionTag(); } }
private void handleMessageRetry(LocalRegion region, EntryEventImpl clientEvent) { if (clientEvent.isPossibleDuplicate()) { if (region.getAttributes().getConcurrencyChecksEnabled()) { // recover the version tag from other servers clientEvent.setRegion(region); if (!recoverVersionTagForRetriedOperation(clientEvent)) { // no-one has seen this event clientEvent.setPossibleDuplicate(false); } } } }
public void postRemoveAllFireEvents(DistributedRemoveAllOperation op, VersionedObjectList successfulOps) { if (!this.dataPolicy.withStorage() && this.concurrencyChecksEnabled && op.getBaseEvent().isBridgeEvent()) { // if there is no local storage we need to transfer version information // to the successfulOps list for transmission back to the client successfulOps.clear(); op.fillVersionedObjectList(successfulOps); } Set successfulKeys = new HashSet(successfulOps.size()); for (Object key: successfulOps.getKeys()) { successfulKeys.add(key); } for (Iterator it=op.eventIterator(); it.hasNext(); ) { EntryEventImpl event = (EntryEventImpl)it.next(); if (successfulKeys.contains(event.getKey())) { invokeDestroyCallbacks(EnumListenerEvent.AFTER_DESTROY, event, !event.callbacksInvoked() && !event.isPossibleDuplicate(), false /* We must notify gateways inside RegionEntry lock, NOT here, to preserve the order of events sent by gateways for same key*/); } } }
@Override public final boolean isGFXDCreate(boolean updateAsCreateOnlyForPosDup) { if (this.op.isCreate()) { return true; } else if (updateAsCreateOnlyForPosDup) { return (isPossibleDuplicate() && this.op.isUpdate() && !hasDelta()); } else { return (this.op.isUpdate() && !hasDelta()); } }
/** * Create RemoveAllPRMessage for notify only (to adjunct nodes) * * @param bucketId * create message to send to this bucket * @return RemoveAllPRMessage */ public RemoveAllPRMessage createPRMessagesNotifyOnly(int bucketId) { final EntryEventImpl event = getBaseEvent(); RemoveAllPRMessage prMsg = new RemoveAllPRMessage(bucketId, removeAllDataSize, true, event.isPossibleDuplicate(), !event.isGenerateCallbacks(), event.getCallbackArgument()); if (event.getContext() != null) { prMsg.setBridgeContext(event.getContext()); } // will not recover event id here for (int i=0; i<removeAllDataSize; i++) { prMsg.addEntry(removeAllData[i]); } return prMsg; }
/** * Constructor to use when preparing to send putall data out */ public RemoveAllEntryData(EntryEventImpl event) { this.key = event.getKey(); Object oldValue = event.getRawOldValue(); if (oldValue == Token.NOT_AVAILABLE || Token.isRemoved(oldValue)) { this.oldValue = null; } else { this.oldValue = oldValue; } this.op = event.getOperation(); this.eventID = event.getEventId(); this.tailKey = event.getTailKey(); this.versionTag = event.getVersionTag(); setNotifyOnly(!event.getInvokePRCallbacks()); setCallbacksInvoked(event.callbacksInvoked()); setPossibleDuplicate(event.isPossibleDuplicate()); setInhibitDistribution(event.getInhibitDistribution()); }
protected void initMessage(CacheOperationMessage msg, DirectReplyProcessor p) { final DistributedRegion region = getRegion(); msg.regionPath = region.getFullPath(); msg.processorId = p == null ? 0 : p.getProcessorId(); msg.processor = p; if (this.event.getOperation().isEntry()) { EntryEventImpl entryEvent = getEvent(); msg.callbackArg = entryEvent.getRawCallbackArgument(); msg.possibleDuplicate = entryEvent.isPossibleDuplicate(); VersionTag tag = entryEvent.getVersionTag(); msg.setInhibitNotificationsBit(entryEvent.inhibitAllNotifications()); if (tag != null && tag.hasValidVersion()) { msg.setVersionTag(tag); } } else { msg.callbackArg = ((RegionEventImpl)this.event).getRawCallbackArgument(); } msg.op = this.event.getOperation(); msg.owner = this; msg.regionAllowsConflation = region.getEnableAsyncConflation(); }
/** * Constructor to use when preparing to send putall data out */ public PutAllEntryData(EntryEventImpl event) { this.key = event.getKey(); this.value = event.getRawNewValueAsHeapObject(); Object oldValue = event.getRawOldValueAsHeapObject(); if (oldValue == Token.NOT_AVAILABLE || Token.isRemoved(oldValue)) { this.oldValue = null; } else { this.oldValue = oldValue; } this.op = event.getOperation(); this.eventID = event.getEventId(); this.tailKey = event.getTailKey(); this.versionTag = event.getVersionTag(); setNotifyOnly(!event.getInvokePRCallbacks()); setCallbacksInvoked(event.callbacksInvoked()); setPossibleDuplicate(event.isPossibleDuplicate()); setInhibitDistribution(event.getInhibitDistribution()); }
protected void initMessage(CacheOperationMessage msg, DirectReplyProcessor p) { msg.regionPath = getRegion().getFullPath(); msg.processorId = p == null ? 0 : p.getProcessorId(); msg.processor = p; if (this.event.getOperation().isEntry()) { EntryEventImpl entryEvent = getEvent(); msg.callbackArg = entryEvent.getRawCallbackArgument(); msg.possibleDuplicate = entryEvent.isPossibleDuplicate(); VersionTag tag = entryEvent.getVersionTag(); msg.setInhibitNotificationsBit(entryEvent.inhibitAllNotifications()); if (tag != null && tag.hasValidVersion()) { msg.setVersionTag(tag); } } else { msg.callbackArg = ((RegionEventImpl)this.event).getRawCallbackArgument(); } msg.op = this.event.getOperation(); msg.owner = this; msg.regionAllowsConflation = getRegion().getEnableAsyncConflation(); }