I've got a lock:
private ReentrantReadWriteLock requestWaitingLock;
System.out.println("write lock acquired");
public void lock()
Acquires the write lock if neither the read nor write lock are held by another strand and returns immediately, setting the write lock hold count to one.
If the current strand already holds the write lock then the hold count is incremented by one and the method returns immediately.
If the lock is held by another strand then the current strand becomes disabled for strand scheduling purposes and lies dormant until the write lock has been acquired, at which time the write lock hold count is set to one.
You seem to call incorrect method to check reader locks:
getReadHoldCount- for current thread only
getReadLockCount- for all threads in the system