Monitor usage is very helpful to solve contention problems of
Code: Select all
synchronized(lock) {
...
}
Code: Select all
final ReentrantReadWriteLock lock = new ReentrantReadWriteLock();
final ReentrantReadWriteLock.WriteLock writeLock = lock.writeLock();
final ReentrantReadWriteLock.ReadLock readLock = lock.readLock();
It would be great to have information about contention on readLock/writeLock of the same ReentrantReadWriteLock as well.
Probably it is available in Flight Recorder of JMC in java7u40.
Thanks!
Vladimir.