Code example for ArrayBlockingQueue

Methods: offer

0
 
	} 
 
	public void recycle(T toRecycle) throws Exception
	{ 
		if (!availables.offer(toRecycle))
		{ 
			factory.destroy(toRecycle);
		} 
	} 
 
	/** 
	 * @param i 
	 */ 
	public void setLimit(int i)
	{ 
		sizeLimit.set(i);
	} 
}