Added simpler API to handle ReadWriteLock.