List of usage examples for java.util.concurrent.locks ReentrantReadWriteLock getReadLockCount
public int getReadLockCount()
From source file:com.aerospike.delivery.db.base.Database.java
public static void assertReadLocked(ReentrantReadWriteLock lock) { if (lock.getReadLockCount() == 0) { throw new AssertionError("Call this operation from inside withReadLocked()."); }/*www .j av a 2s . com*/ }
From source file:Main.java
private static String getLockInfo(ReentrantReadWriteLock lock) { String lockid = "RWLock@" + Integer.toHexString(lock.hashCode()); return lockid + " readLockCount=" + lock.getReadLockCount() + " isWriteLocked=" + lock.isWriteLocked(); }