void putValueTXEntry(final TXEntryState tx) { Object v = basicGetNewValue(); if (v == null) { if (deltaBytes != null) { // since newValue is null, and we have deltaBytes // there must be a nearSidePendingValue processDeltaBytes(tx.getNearSidePendingValue()); v = basicGetNewValue(); } else if (this.delta != null) { v = this.delta; } else { v = isLocalInvalid() ? Token.LOCAL_INVALID : Token.INVALID; } } if (this.op != Operation.LOCAL_INVALIDATE && this.op != Operation.LOCAL_DESTROY) { // fix for bug 34387 tx.setPendingValue(OffHeapHelper.copyIfNeeded(v)); // TODO OFFHEAP optimize } tx.setCallbackArgument(getCallbackArgument()); }
final void putValueTXEntry(final TXEntryState txEntry, final byte op) { // !!!:ezoerner:20080611 Deltas do not yet work with transactions // [sumedh] 20101215: GemFireXD deltas now work correctly with transactions Object v = basicGetNewValue(); if (v == null) { if (deltaBytes != null) { // since newValue is null, and we have deltaBytes // there must be a nearSidePendingValue processDeltaBytes(txEntry.getNearSidePendingValue()); v = basicGetNewValue(); } else if (delta == null) { if (this.op.isInvalidate()) { v = isLocalInvalid() ? Token.LOCAL_INVALID : Token.INVALID; } } } if (this.op != Operation.LOCAL_INVALIDATE && this.op != Operation.LOCAL_DESTROY) { // fix for bug 34387 txEntry.setPendingValue(OffHeapHelper.copyIfNeeded(v), this.delta, this.region, op); // TODO OFFHEAP optimize } putTXEntryCallbackArg(txEntry); }
currentTXEntry.op = currentTXEntry.adviseOp(this.op); currentTXEntry.setPendingValue(this.pendingValue, this.pendingDelta, region, currentTXEntry.op);