Here you can find the source of downgradeWriteLock(final ReadWriteLock lock)
public static void downgradeWriteLock(final ReadWriteLock lock)
//package com.java2s; //License from project: Open Source License import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReadWriteLock; public class Main { public static void downgradeWriteLock(final ReadWriteLock lock) { acquireReadLock(lock);/* w w w . j a v a 2s . c om*/ releaseWriteLock(lock); } public static void acquireReadLock(final ReadWriteLock lock) { acquireLock(lock.readLock()); } public static void releaseWriteLock(final ReadWriteLock lock) { releaseLock(lock.writeLock()); } public static void acquireLock(final Lock lock) { lock.lock(); } public static void releaseLock(final Lock lock) { lock.unlock(); } }