Code example for ConcurrentHashMap

Methods: keySet

0
	/** 
	 * Gets the threads being monitored. 
	 * @return the set of threads being monitored. 
	 */ 
	public Set<Thread> getMonitoringThreads() {
		return this.monitoringThreadsAndPermits.keySet();
	} 
 
	/** 
	 * Decreases the number of available permits by  
	 * <code>permitsToRemove</code>. 
	 * @param permitsToRemove The number of permits which are not 
	 * available anymore. 
	 */ 
	public void removeAvailablePermits(int permitsToRemove) {
		this.availablePermits-=permitsToRemove;
	} 
 
	/** 
	 * Increases the number of available permits by <code>numPermits</code>. 
	 * @param numPermits The number of permits to be added.