Code example for ReadWriteLock

Methods: readLock

0
	// =========================================================== 
	// Getter & Setter 
	// =========================================================== 
 
	public void ensureCapacity(final int aCapacity) {
		mReadWriteLock.readLock().lock();
		try { 
			mCachedTiles.ensureCapacity(aCapacity);
		} finally { 
			mReadWriteLock.readLock().unlock();
		} 
	} 
 
	public Drawable getMapTile(final MapTile aTile) {
		mReadWriteLock.readLock().lock();
		try { 
			return this.mCachedTiles.get(aTile);
		} finally { 
			mReadWriteLock.readLock().unlock();
		} 
	}