Code example for ReferenceQueue

Methods: poll

0
	} 
 
	public V get(K key) {
		lock.lock();
		try { 
			queue.poll();
			return map.get(key).get();
		} finally { 
			lock.unlock();
		} 
	} 
 
	public void remove(K key) {
		lock.lock();
		try { 
			map.remove(key);
		} finally { 
			lock.unlock();
		} 
	}