/** * Creates a new Lock for reading and increments counter for active readers. The lock is tracked * if lock tracking is enabled. This method is not thread safe itself, the calling method is * expected to handle synchronization issues. * * @return a read lock. */ protected Lock createReadLock() { return activeReaders.createLock("Read"); }
/** * Creates a new Lock for writing. The lock is tracked if lock tracking is enabled. This method is * not thread safe itself for performance reasons, the calling method is expected to handle * synchronization issues. * * @return a write lock. */ protected Lock createWriteLock() { return activeWriter.createLock("Write"); }