getWriteLock

Gets an exclusive write lock. This method blocks when the write lock is in use or has already been
requested until the write lock is released. This method also block when read locks are active until all
of them are released.