Code example for ConcurrentLinkedQueue

Methods: isEmptypoll

0
	 * 从queue中获取消息 
	 * @return String 
	 */ 
	public static String getQueueMessage(){
		if(queueIsEmpty()){ 
			return queue.poll();
		} 
		return null; 
	} 
	 
	/** 
	 * 判断queue是否为空 
	 * @return boolean 
	 */ 
	public static boolean queueIsEmpty(){ 
		if(queue.isEmpty()){
			return false;  
		} 
		return true; 
	} 
	 
Stop searching for code, let great code find you!  Add Codota to your java IDE