/** * Releases in exclusive mode. Implemented by unblocking one or more threads. * * @throws IllegalMonitorStateException * if releasing would place this synchronizer in an illegal state or * lock is not held by the calling thread. This exception must be * thrown in a consistent fashion for synchronization to work * correctly. */ public final void releaseWriteLock(Object owner) { releaseWriteLock(); }
public void releaseWriteLock() { this.lock.releaseWriteLock(null); }
/** * Clear the cache retrieved value for given table. */ public void clearRetrievedValue(Object table) { this.generatedValuesLock.attemptWriteLock(-1); try { this.generatedValues.remove(table); } finally { this.generatedValuesLock.releaseWriteLock(); } }
/** * Clear the cache retrieved value for given table. */ public void clearRetrievedValue(Object table) { this.generatedValuesLock.attemptWriteLock(-1); try { this.generatedValues.remove(table); } finally { this.generatedValuesLock.releaseWriteLock(); } }
/** * Clear the cache retrieved value for given table. */ public void clearRetrievedValue(Object table) { this.generatedValuesLock.attemptWriteLock(-1); try { this.generatedValues.remove(table); } finally { this.generatedValuesLock.releaseWriteLock(); } }
/** * Get the generated IDENTITY value for given table next to the one last * retrieved by this node. Also mark the value to have been read by the new * generating node that is reading this IDENTITY value. */ public long getAfterRetrievedValue(Object table, long start, long increment, DistributedMember idGeneratingNode) { this.generatedValuesLock.attemptWriteLock(-1); try { Object[] id = this.generatedValues.get(table); if (id != null) { AtomicLong currValue = (AtomicLong)id[0]; id[1] = idGeneratingNode; return (currValue.get() + increment); } else { this.generatedValues.put(table, new Object[] { new AtomicLong(start), idGeneratingNode }); return start; } } finally { this.generatedValuesLock.releaseWriteLock(); } }
/** * Get the generated IDENTITY value for given table next to the one last * retrieved by this node. Also mark the value to have been read by the new * generating node that is reading this IDENTITY value. */ public long getAfterRetrievedValue(Object table, long start, long increment, DistributedMember idGeneratingNode) { this.generatedValuesLock.attemptWriteLock(-1); try { Object[] id = this.generatedValues.get(table); if (id != null) { AtomicLong currValue = (AtomicLong)id[0]; id[1] = idGeneratingNode; return (currValue.get() + increment); } else { this.generatedValues.put(table, new Object[] { new AtomicLong(start), idGeneratingNode }); return start; } } finally { this.generatedValuesLock.releaseWriteLock(); } }
/** * Get the generated IDENTITY value for given table next to the one last * retrieved by this node. Also mark the value to have been read by the new * generating node that is reading this IDENTITY value. */ public long getAfterRetrievedValue(Object table, long start, long increment, DistributedMember idGeneratingNode) { this.generatedValuesLock.attemptWriteLock(-1); try { Object[] id = this.generatedValues.get(table); if (id != null) { AtomicLong currValue = (AtomicLong)id[0]; id[1] = idGeneratingNode; return (currValue.get() + increment); } else { this.generatedValues.put(table, new Object[] { new AtomicLong(start), idGeneratingNode }); return start; } } finally { this.generatedValuesLock.releaseWriteLock(); } }
this.mapLock.releaseWriteLock();
public void close() { this.suspectEntriesLock.attemptWriteLock(-1); try { for (SuspectEntryList l : this.suspectEntries.values()) { for (EntryEventImpl e : l) { e.release(); } } } finally { this.suspectEntriesLock.releaseWriteLock(); } clear(null); }
/** * {@inheritDoc} */ @Override public void unlockPendingTXRegionStates(final boolean forWrite) { if (this.pendingTXRegionStatesLock != null) { if (forWrite) { this.pendingTXRegionStatesLockOwner = null; this.pendingTXRegionStatesLock.releaseWriteLock(); } else { this.pendingTXRegionStatesLock.releaseReadLock(); } if (TXStateProxy.LOG_FINE) { final LogWriterI18n logger = InternalDistributedSystem.getLoggerI18n(); if (logger != null) { logger.info(LocalizedStrings.DEBUG, "ImageState#" + "unlockPendingTXRegionStates: " + (forWrite ? "write" : "read") + " lock released " + this.pendingTXRegionStatesLock); } } } }
if (forWrite) { this.pendingTXRegionStatesLockOwner = null; this.pendingTXRegionStatesLock.releaseWriteLock();
this.finishedTXIdOrders = txIdOrders; } finally { this.pendingTXRegionStatesLock.releaseWriteLock();
public void applyAllSuspects(final LocalRegion owner) { this.suspectEntriesLock.attemptWriteLock(-1); try { while (!this.suspectEntries.isEmpty()) { final LogWriterI18n log = owner.getLogWriterI18n(); if (log.infoEnabled()) { log.info(LocalizedStrings.DEBUG, "applyAllSuspects called for region: " + owner.getName()); } SuspectEntryList list; for (Object key : this.listForKeyOrder) { list = this.suspectEntries.remove(key); applySuspect(key, list, owner, log); } } // test method owner.suspendApplyAllSuspects(); // clear the failed events list owner.getImageState().clearFailedEvents(); this.applyAllSuspectsFinished = true; } finally { this.listForKeyOrder.clear(); this.suspectEntriesLock.releaseWriteLock(); } }
this.listUpdateLock.releaseWriteLock();
this.listUpdateLock.releaseWriteLock();