public final void releaseLock(final LockMode mode, final boolean releaseAll, Object owner) { releaseLock(mode, releaseAll, owner, null); }
public void releaseReadLock() { this.lock.releaseLock(LockMode.READ_ONLY, false, null); }
public void releaseWriteLock() { this.lock.releaseLock(LockMode.EX, false, null); }
public void releaseWriteLock() { this.lock.releaseLock(LockMode.EX_SH, false, null); }
public void releaseReadLock() { this.lock.releaseLock(LockMode.SH, false, null); }
public void releaseWriteLock() { this.lock.releaseLock(LockMode.EX, false, null); }
public void releaseReadLock() { this.lock.releaseLock(LockMode.READ_ONLY, false, null); }
public void run() { try { if (this.l.attemptLock(LockMode.SH, waitMillisForTakingLock, null)) { Thread.sleep(this.sleepMillisAfterTakingLock); } else { failed = true; } } catch (InterruptedException e) { fail("did not expect exception in taking read locks"); } this.l.releaseLock(LockMode.SH, false, null); } }
public void doMe(Transaction xact, LogInstant instant, LimitObjectInput in) throws StandardException, IOException { if (this.logger.fineEnabled() || GemFireXDUtils.TracePersistIndex) { GfxdIndexManager.traceIndex( "IRFLockAcquireOp::doMe called releasing lock on=%s ", this.lock); } this.lock.releaseLock(LockMode.EX, false, this.owner); if (this.logger.fineEnabled() || GemFireXDUtils.TracePersistIndex) { GfxdIndexManager.traceIndex( "IRFLockAcquireOp::doMe called acquired lock on=%s ", this.lock); } }
public void doMe(Transaction xact, LogInstant instant, LimitObjectInput in) throws StandardException, IOException { if (this.logger.fineEnabled() || GemFireXDUtils.TracePersistIndex) { GfxdIndexManager.traceIndex( "IRFLockAcquireOp::doMe called releasing lock on=%s ", this.lock); } this.lock.releaseLock(LockMode.EX, false, this.owner); if (this.logger.fineEnabled() || GemFireXDUtils.TracePersistIndex) { GfxdIndexManager.traceIndex( "IRFLockAcquireOp::doMe called acquired lock on=%s ", this.lock); } }
public void doMe(Transaction xact, LogInstant instant, LimitObjectInput in) throws StandardException, IOException { if (this.logger.fineEnabled() || GemFireXDUtils.TracePersistIndex) { GfxdIndexManager.traceIndex( "IRFLockAcquireOp::doMe called releasing lock on=%s ", this.lock); } this.lock.releaseLock(LockMode.EX, false, this.owner); if (this.logger.fineEnabled() || GemFireXDUtils.TracePersistIndex) { GfxdIndexManager.traceIndex( "IRFLockAcquireOp::doMe called acquired lock on=%s ", this.lock); } }
this.l.releaseLock(LockMode.SH, false, null); this.l.releaseLock(LockMode.EX_SH, true, id); this.l.releaseLock(LockMode.EX, true, id);
lock.releaseLock(LockMode.EX_SH, true, id); try { lock.releaseLock(LockMode.EX_SH, false, id); fail("write share release clears the write bits, so second attempt " + "should fail");
lock.releaseLock(LockMode.SH, false, null); lock.releaseLock(LockMode.SH, true, null); fail("attempt to release read lock when read count is 0 " + "should have failed"); lock.releaseLock(LockMode.EX_SH, true, id2); fail("attempt to release write share lock when " + "owner is different should fail"); lock.releaseLock(LockMode.EX_SH, true, id); lock.releaseLock(LockMode.EX_SH, false, id); fail("attempt to release write share lock when share counter " + "is reset should have failed"); lock.releaseLock(LockMode.EX_SH, true, id2); fail("attempt to release write share lock when " + "owner is different should fail"); lock.releaseLock(LockMode.EX, true, id2); fail("attempt to release write share lock when " + "owner is different should fail"); lock.releaseLock(LockMode.EX, true, id); lock.releaseLock(LockMode.EX, true, id); fail("attempt to release write share lock when share counter is reset " + "should have failed");
lock.releaseLock(LockMode.SH, true, null); lock.releaseLock(LockMode.SH, false, null); lock.releaseLock(LockMode.EX_SH, false, id); lock.releaseLock(LockMode.SH, true, null); assertTrue(lock.attemptLock(LockMode.SH, 0, null)); assertFalse(lock.attemptLock(LockMode.EX, 0, id)); lock.releaseLock(LockMode.SH, false, id); assertTrue(lock.attemptLock(LockMode.SH, 0, id)); assertFalse(lock.attemptLock(LockMode.EX, 0, id)); lock.releaseLock(LockMode.SH, true, id); assertTrue(lock.attemptLock(LockMode.EX, 0, id)); lock.releaseLock(LockMode.EX, true, id); lock.releaseLock(LockMode.SH, false, null); assertTrue(lock.attemptLock(LockMode.EX, 0, id)); lock.releaseLock(LockMode.EX, false, id); lock.releaseLock(LockMode.EX, true, id); try { lock.releaseLock(LockMode.EX, true, id); fail("expected IllegalMonitorStateException"); } catch (IllegalMonitorStateException ex) { lock.releaseLock(LockMode.EX, false, id); fail("expected IllegalMonitorStateException"); } catch (IllegalMonitorStateException ex) {
public void releaseSnapshotGIIReadLock() { if (readLockEnabled()) { if (this.getPartitionedRegion().isInternalColumnTable()) { BucketRegion bufferRegion = getBufferRegion(); bufferRegion.releaseSnapshotGIIReadLock(); } else { final LogWriterI18n logger = getCache().getLoggerI18n(); if (logger.fineEnabled()) { logger.fine("Releasing readonly snapshotGIILock on bucket " + this.getName()); } snapshotGIILock.releaseLock(LockMode.SH, false, giiReadLockForSIOwner); } } }
public void releaseSnapshotGIIWriteLock() { if (writeLockEnabled()) { if (this.getPartitionedRegion().isInternalColumnTable()) { BucketRegion bufferRegion = getBufferRegion(); bufferRegion.releaseSnapshotGIIWriteLock(); } else { final LogWriterI18n logger = getCache().getLoggerI18n(); if (logger.fineEnabled()) { logger.fine("Releasing exclusive snapshotGIILock on bucket " + this.getName()); } if (this.snapshotGIILock.hasExclusiveLock(giiWriteLockForSIOwner, null)) { if (snapshotGIILocked) { snapshotGIILock.releaseLock(LockMode.EX, false, giiWriteLockForSIOwner); getBucketAdvisor().removeMembershipListener(giiListener); this.giiListener = null; snapshotGIILocked = false; } } if (logger.fineEnabled()) { logger.fine("Released exclusive snapshotGIILock on bucket " + this.getName()); } } } }