Code example for ReadWriteLock

Methods: readLockwriteLock

0
 
	private LinkedHashMap<Integer, Bitmap> imgCache;
 
	private ReadWriteLock rwLock = new ReentrantReadWriteLock();
 
	private final Lock rLock = rwLock.readLock();
 
	private final Lock wLock = rwLock.writeLock();
 
	private class IdView { 
		int imageId;
		ImageView view;
 
		IdView(int imageId, ImageView view) {
			this.imageId = imageId;
			this.view = view;
		} 
	} 
 
	public ImageLoader(final ContentResolver contentResolver, final Handler h, final int size, final int cacheSize) {
Stop searching for code, let great code find you!  Add Codota to your java IDE