ReentrantLock and ReentrantReadWriteLock example