@Override public void lockingRowForTX(TXStateProxy tx, GemFireContainer container, RegionEntry entry, boolean writeLock) { final GemFireXDQueryObserver[] observers = this.observerCollection; for (GemFireXDQueryObserver observer : observers) { observer.lockingRowForTX(tx, container, entry, writeLock); } }
@Override public void lockingRowForTX(TXStateProxy tx, GemFireContainer container, RegionEntry entry, boolean writeLock) { final GemFireXDQueryObserver[] observers = this.observerCollection; for (GemFireXDQueryObserver observer : observers) { observer.lockingRowForTX(tx, container, entry, writeLock); } }
@Override public void lockingRowForTX(TXStateProxy tx, GemFireContainer container, RegionEntry entry, boolean writeLock) { final GemFireXDQueryObserver[] observers = this.observerCollection; for (GemFireXDQueryObserver observer : observers) { observer.lockingRowForTX(tx, container, entry, writeLock); } }
/** * Acquire lock on an entry for reading. For updates the read lock will be * upgraded to write once the row is qualified. */ public static boolean lockForRead(final TXState tx, final LockingPolicy lockPolicy, final LockMode mode, final int lockFlags, final RegionEntry entry, final GemFireContainer container, final LocalRegion dataRegion, final GemFireXDQueryObserver observer) { assert dataRegion != null: "unexpected null data region for " + entry + " in container " + container; final TXId txId = tx.getTransactionId(); if (observer != null) { observer.lockingRowForTX(tx.getProxy(), container, entry, false); } lockPolicy.acquireLock(entry, mode, lockFlags, txId, dataRegion, null); if (!entry.isDestroyedOrRemoved()) { return true; } unlockEntryAfterRead(txId, lockPolicy, mode, entry, container, dataRegion); return false; }
/** * Acquire lock on an entry for reading. For updates the read lock will be * upgraded to write once the row is qualified. */ public static boolean lockForRead(final TXState tx, final LockingPolicy lockPolicy, final LockMode mode, final int lockFlags, final RegionEntry entry, final GemFireContainer container, final LocalRegion dataRegion, final GemFireXDQueryObserver observer) { assert dataRegion != null: "unexpected null data region for " + entry + " in container " + container; final TXId txId = tx.getTransactionId(); if (observer != null) { observer.lockingRowForTX(tx.getProxy(), container, entry, false); } lockPolicy.acquireLock(entry, mode, lockFlags, txId, dataRegion, null); if (!entry.isDestroyedOrRemoved()) { return true; } unlockEntryAfterRead(txId, lockPolicy, mode, entry, container, dataRegion); return false; }
/** * Acquire lock on an entry for reading. For updates the read lock will be * upgraded to write once the row is qualified. */ public static boolean lockForRead(final TXState tx, final LockingPolicy lockPolicy, final LockMode mode, final int lockFlags, final RegionEntry entry, final GemFireContainer container, final LocalRegion dataRegion, final GemFireXDQueryObserver observer) { assert dataRegion != null: "unexpected null data region for " + entry + " in container " + container; final TXId txId = tx.getTransactionId(); if (observer != null) { observer.lockingRowForTX(tx.getProxy(), container, entry, false); } lockPolicy.acquireLock(entry, mode, lockFlags, txId, dataRegion, null); if (!entry.isDestroyedOrRemoved()) { return true; } unlockEntryAfterRead(txId, lockPolicy, mode, entry, container, dataRegion); return false; }
@Override public final void upgradeCurrentRowLocationLockToWrite() throws StandardException { if (this.currentRowLocation != null && this.currentDataRegion != null) { final RegionEntry entry = this.currentRowLocation .getUnderlyingRegionEntry(); final TXStateProxy txProxy = this.localTXState.getProxy(); if (this.observer != null) { this.observer.lockingRowForTX(txProxy, this.baseContainer, entry, true); } try { // upgrade the lock since the entry has been qualified txProxy.lockEntry(entry, entry.getKey(), GemFireXDUtils .getRoutingObject(this.currentRowLocation.getBucketID()), this.baseContainer.getRegion(), this.currentDataRegion, true, TXEntryState.getLockForUpdateOp()); } finally { // now release the SH lock after the atomic lock upgrade, or as // cleanup in case of lock upgrade failure GemFireXDUtils.releaseLockForReadOnPreviousEntry(entry, this.localTXState, this.txId, this.lockPolicy, this.readLockMode, this.baseContainer, this.currentDataRegion, this.lockContext); } this.currentDataRegion = null; } }
@Override public final void upgradeCurrentRowLocationLockToWrite() throws StandardException { if (this.currentRowLocation != null && this.currentDataRegion != null) { final RegionEntry entry = this.currentRowLocation .getUnderlyingRegionEntry(); final TXStateProxy txProxy = this.localTXState.getProxy(); if (this.observer != null) { this.observer.lockingRowForTX(txProxy, this.gfContainer, entry, true); } try { // upgrade the lock since the entry has been qualified txProxy.lockEntry(entry, entry.getKey(), GemFireXDUtils .getRoutingObject(this.currentRowLocation.getBucketID()), this.gfContainer.getRegion(), this.currentDataRegion, true, TXEntryState.getLockForUpdateOp()); } finally { // now release the SH lock after the atomic lock upgrade, or as // cleanup in case of lock upgrade failure GemFireXDUtils.releaseLockForReadOnPreviousEntry(entry, this.localTXState, this.txId, this.lockPolicy, this.readLockMode, this.gfContainer, this.currentDataRegion, this.lockContext); } this.currentDataRegion = null; } }
@Override public final void upgradeCurrentRowLocationLockToWrite() throws StandardException { if (this.currentRowLocation != null && this.currentDataRegion != null) { final RegionEntry entry = this.currentRowLocation .getUnderlyingRegionEntry(); final TXStateProxy txProxy = this.localTXState.getProxy(); if (this.observer != null) { this.observer.lockingRowForTX(txProxy, this.gfContainer, entry, true); } try { // upgrade the lock since the entry has been qualified txProxy.lockEntry(entry, entry.getKey(), GemFireXDUtils .getRoutingObject(this.currentRowLocation.getBucketID()), this.gfContainer.getRegion(), this.currentDataRegion, true, TXEntryState.getLockForUpdateOp()); } finally { // now release the SH lock after the atomic lock upgrade, or as // cleanup in case of lock upgrade failure GemFireXDUtils.releaseLockForReadOnPreviousEntry(entry, this.localTXState, this.txId, this.lockPolicy, this.readLockMode, this.gfContainer, this.currentDataRegion, this.lockContext); } this.currentDataRegion = null; } }
@Override public final void upgradeCurrentRowLocationLockToWrite() throws StandardException { if (this.currentRowLocation != null && this.currentDataRegion != null) { final RegionEntry entry = this.currentRowLocation .getUnderlyingRegionEntry(); final TXStateProxy txProxy = this.localTXState.getProxy(); if (this.observer != null) { this.observer.lockingRowForTX(txProxy, this.gfContainer, entry, true); } try { // upgrade the lock since the entry has been qualified txProxy.lockEntry(entry, entry.getKey(), GemFireXDUtils .getRoutingObject(this.currentRowLocation.getBucketID()), this.gfContainer.getRegion(), this.currentDataRegion, true, TXEntryState.getLockForUpdateOp()); } finally { // now release the SH lock after the atomic lock upgrade, or as // cleanup in case of lock upgrade failure GemFireXDUtils.releaseLockForReadOnPreviousEntry(entry, this.localTXState, this.txId, this.lockPolicy, this.readLockMode, this.gfContainer, this.currentDataRegion, this.lockContext); } this.currentDataRegion = null; } }
@Override public final void upgradeCurrentRowLocationLockToWrite() throws StandardException { if (this.currentRowLocation != null && this.currentDataRegion != null) { final RegionEntry entry = this.currentRowLocation .getUnderlyingRegionEntry(); final TXStateProxy txProxy = this.localTXState.getProxy(); if (this.observer != null) { this.observer.lockingRowForTX(txProxy, this.baseContainer, entry, true); } try { // upgrade the lock since the entry has been qualified txProxy.lockEntry(entry, entry.getKey(), GemFireXDUtils .getRoutingObject(this.currentRowLocation.getBucketID()), this.baseContainer.getRegion(), this.currentDataRegion, true, TXEntryState.getLockForUpdateOp()); } finally { // now release the SH lock after the atomic lock upgrade, or as // cleanup in case of lock upgrade failure GemFireXDUtils.releaseLockForReadOnPreviousEntry(entry, this.localTXState, this.txId, this.lockPolicy, this.readLockMode, this.baseContainer, this.currentDataRegion, this.lockContext); } this.currentDataRegion = null; } }
@Override public final void upgradeCurrentRowLocationLockToWrite() throws StandardException { if (this.currentRowLocation != null && this.currentDataRegion != null) { final RegionEntry entry = this.currentRowLocation .getUnderlyingRegionEntry(); final TXStateProxy txProxy = this.localTXState.getProxy(); if (this.observer != null) { this.observer.lockingRowForTX(txProxy, this.baseContainer, entry, true); } try { // upgrade the lock since the entry has been qualified txProxy.lockEntry(entry, entry.getKey(), GemFireXDUtils .getRoutingObject(this.currentRowLocation.getBucketID()), this.baseContainer.getRegion(), this.currentDataRegion, true, TXEntryState.getLockForUpdateOp()); } finally { // now release the SH lock after the atomic lock upgrade, or as // cleanup in case of lock upgrade failure GemFireXDUtils.releaseLockForReadOnPreviousEntry(entry, this.localTXState, this.txId, this.lockPolicy, this.readLockMode, this.baseContainer, this.currentDataRegion, this.lockContext); } this.currentDataRegion = null; } }
.getInstance(); if (observer != null) { observer.lockingRowForTX(tx.getProxy(), (GemFireContainer)region.getUserAttribute(), txs.getUnderlyingRegionEntry(), true);
.getInstance(); if (observer != null) { observer.lockingRowForTX(tx.getProxy(), (GemFireContainer)region.getUserAttribute(), txs.getUnderlyingRegionEntry(), true);
.getInstance(); if (observer != null) { observer.lockingRowForTX(tx.getProxy(), (GemFireContainer)region.getUserAttribute(), txs.getUnderlyingRegionEntry(), true);
final TXStateProxy txProxy = tx.getProxy(); if (this.observer != null) { this.observer.lockingRowForTX(txProxy, container, entry, true);
final TXStateProxy txProxy = tx.getProxy(); if (this.observer != null) { this.observer.lockingRowForTX(txProxy, container, entry, true);
final TXStateProxy txProxy = tx.getProxy(); if (this.observer != null) { this.observer.lockingRowForTX(txProxy, container, entry, true);