protected final void setOpType(byte opType, Object callbackArg) { this.op = opType; if (callbackArg != null) { setCallbackArgument(callbackArg); } }
final void putTXEntryCallbackArg(final TXEntryState txEntry) { final Object callbackArg = getRawCallbackArgument(); if (callbackArg != null) { txEntry.setCallbackArgument(getCallbackArgument(callbackArg)); } else { txEntry.setCallbackArgument(null); } }
@Override protected final void setCallbackArgument(Object callbackArgument) { // we cannot set a thread-local type of callbackArgument in the TXState // since it will be reused (#44074) if (callbackArgument instanceof GfxdCallbackArgument) { final GfxdCallbackArgument sca = (GfxdCallbackArgument)callbackArgument; if (sca.isThreadLocalInstance()) { final Object currentCallbackArg = getCallbackArgument(); if (currentCallbackArg != null && sca.equals(currentCallbackArg)) { // nothing to do since we already have the same callback argument return; } else { callbackArgument = sca.cloneObject(); } } } super.setCallbackArgument(callbackArgument); }
@Override protected final void setCallbackArgument(Object callbackArgument) { // we cannot set a thread-local type of callbackArgument in the TXState // since it will be reused (#44074) if (callbackArgument instanceof GfxdCallbackArgument) { final GfxdCallbackArgument sca = (GfxdCallbackArgument)callbackArgument; if (sca.isThreadLocalInstance()) { final Object currentCallbackArg = getCallbackArgument(); if (currentCallbackArg != null && sca.equals(currentCallbackArg)) { // nothing to do since we already have the same callback argument return; } else { callbackArgument = sca.cloneObject(); } } } super.setCallbackArgument(callbackArgument); }
@Override protected final void setCallbackArgument(Object callbackArgument) { // we cannot set a thread-local type of callbackArgument in the TXState // since it will be reused (#44074) if (callbackArgument instanceof GfxdCallbackArgument) { final GfxdCallbackArgument sca = (GfxdCallbackArgument)callbackArgument; if (sca.isThreadLocalInstance()) { final Object currentCallbackArg = getCallbackArgument(); if (currentCallbackArg != null && sca.equals(currentCallbackArg)) { // nothing to do since we already have the same callback argument return; } else { callbackArgument = sca.cloneObject(); } } } super.setCallbackArgument(callbackArgument); }
entry.pendingValue = pendingValue; entry.setCallbackArgument(callbackArg); this.pendingOps.add(entry); if (this.pendingOpsRegions != null) {
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()); }
entry.setCallbackArgument(event.getCallbackArgument()); txr.addPendingTXOpAndUnlockGII(entry, AbstractRegionEntry.ALLOW_ONE_READ_ONLY_WITH_EX_SH);
entry.setCallbackArgument(event.getCallbackArgument()); txr.addPendingTXOpAndUnlockGII(entry, AbstractRegionEntry.ALLOW_ONE_READ_ONLY_WITH_EX_SH);
entry.pendingValue = OffHeapHelper.copyIfNeeded(event.getRawNewValue()); entry.setCallbackArgument(event.getCallbackArgument()); txr.addPendingTXOpAndUnlockGII(entry, AbstractRegionEntry.ALLOW_ONE_READ_ONLY_WITH_EX_SH);