private final void markPending(TXEntryState tx, byte opType, Object callbackArg) { this.headLock.lock(); try { tx.setOpType(opType, callbackArg); // mark for pending in the list so batch will be flushed at end of // message execution if required tx.updateForCommitNoLock(this, true); } finally { this.headLock.unlock(); } }
/** * Place the entry at the end of queue to order the update events. * * @since 7.0 */ protected final void updateForCommit(final TXState txState) { // mark TX as dirty txState.getProxy().markDirty(); final TXEntryState head = txState.head; // assuming TXRegionState is locked, the access to next for this entry need // not be synchronized TXEntryState next = this.next; // return immediately if this is already the last entry if (next == head) { return; } final NonReentrantLock headLock = txState.headLock; headLock.lock(); try { updateForCommitNoLock(txState, false); } finally { headLock.unlock(); } }
try { if ((success = entry.invalidate(event, op))) { entry.updateForCommitNoLock(this, true);
try { entry.destroyPart2(event); entry.updateForCommitNoLock(this, true); } finally { this.headLock.unlock();
try { tx.basicPutPart2(event, putOp); tx.updateForCommitNoLock(this, true); } finally { this.headLock.unlock();