Code example for ReentrantLock

Methods: isLocked, lock, unlock

0
	 *  
	 * @see #getFavicon(URL) 
	 * @see #isLoadEnabled() 
	 */ 
	public void setLoadEnabled(boolean enabled) {
		if (enabled && mLoadLock.isLocked()) {
			mLoadLock.unlock();
		} else if (!enabled && !mLoadLock.isLocked()) {
			mLoadLock.lock();
		} 
	} 
	 
	/** 
	 * Is loading from Internet permitted? 
	 *  
	 * @return {@code true} if loading is enabled 
	 *  
	 * @see #getFavicon(URL) 
	 * @see #setLoadEnabled(boolean) 
	 */ 
	public boolean isLoadEnabled() {