refactored RWLock to indicate the collection that it supports
added back contains checks ; limit read lock and write lock hold time