Code example for ReentrantReadWriteLock

Methods: readLock, writeLock

0
	private final AtomicLong totalExecutionTime = new AtomicLong();
 
	private final Lock readLock;
	private final Lock writeLock;
	{ 
		final ReadWriteLock lock = new ReentrantReadWriteLock();
		this.readLock = lock.readLock();
		this.writeLock = lock.writeLock();
	} 
 
	ConcurrentNaturalIdCacheStatisticsImpl(Region region) {
		super( region.getName() );
		this.region = region;
	} 
 
	@Override 
	public long getHitCount() { 
		return this.hitCount.get();
	} 
 
	@Override