protected final boolean isOpDestroyEvent(LocalRegion r) { // Note that if the region is a proxy then we go ahead and distribute // the destroy because we can't eliminate it based on committed state return isOpDestroy() && (r.isProxy() || !Token.isRemoved(this.originalVersionId)); }
/** * Gets the pending value for near side operations. Special cases local * destroy and local invalidate to fix bug 34387. */ @Unretained public final Object getNearSidePendingValue() { if (isOpDestroy()) { return null; } if (isOpLocalInvalidate()) { return Token.LOCAL_INVALID; } return getPendingValue(); }
/** * Returns true if this operation has an event for the tx listener * * @since 5.0 */ protected final boolean isOpAnyEvent() { //return isOpPutEvent() || isOpCreateEvent() || isOpInvalidateEvent() // || isOpDestroyEvent(this.txRegionState.region); // return if any operation but check if entry created in TX itself got // destroyed (except if it is an empty region since then we have to // distribute events in any case) return this.op > OP_NULL && (!isOpDestroy() || !wasCreatedByTX() || getBaseRegion().isProxy()); }
final boolean isOpDestroyEvent(LocalRegion r) { // Note that if the region is a proxy then we go ahead and distributed // the destroy because we can't eliminate it based on committed state return isOpDestroy() && (r.isProxy() || (getOriginalValue() != null && !Token.isRemoved(getOriginalValue()))); }
protected final EntryEventImpl getEvent(final TXState txs, final boolean isCohort, final InternalDistributedMember myId) { // dumpOp(); //TODO:ASIF : Should we generate EventID ? At this point not generating final LocalRegion eventRegion = getBaseRegion(); final EntryEventImpl result = EntryEventImpl.create(eventRegion, getNearSideOperation(), this.regionKey, getNearSidePendingValue(), getCallbackArgument(), false, myId); // OFFHEAP: freeOffHeapResources on this event is called from TXEvent.freeOffHeapResources. if (this.destroy == DESTROY_NONE || isOpDestroy()) { result.setOldValue(this.originalVersionId); } // Use coordinator to determine if the originRemote flag should be set. // The event can come to coordinator from itself in nested function // execution so this flag is more reliable -- see bug #41498. result.setOriginRemote(isCohort); result.setTXState(txs); return result; }
if (isOpDestroy() && !this.fromGII) { Assert.fail("Transactional destroy assertion op=" + this.op);
EntryEvent getEvent(LocalRegion r, Object key, TXState txs) { // dumpOp(); //TODO:ASIF : Shopuld we generate EventID ? At this point not generating LocalRegion eventRegion = r; if (r.isUsedForPartitionedRegionBucket()) { eventRegion = r.getPartitionedRegion(); } EntryEventImpl result = new TxEntryEventImpl(eventRegion, key); // OFFHEAP: freeOffHeapResources on this event is called from TXEvent.freeOffHeapResources. boolean returnedResult = false; try { if (this.destroy == DESTROY_NONE || isOpDestroy()) { result.setOldValue(getOriginalValue()); } if(txs.isOriginRemoteForEvents()) { result.setOriginRemote(true); } else { result.setOriginRemote(false); } result.setTransactionId(txs.getTransactionId()); returnedResult = true; return result; } finally { if (!returnedResult) result.release(); } }
Assert.assertTrue(!isOpDestroy(), "Transactional destroy assertion op=" + this.op); advisedOpCode = requestedOpCode;
if (!isOpDestroy(op)) { Assert.fail("unexpected value and delta both null in " + "TXEntryState#setPendingValue with op " + op + ": " + toString());
if (event.hasDeltaPut() && tx.isOpDestroy()) { throw new EntryNotFoundException( "No previously created entry to be updated for event: " + event);