Code example for LinkedBlockingQueue

Methods: drainTo, size

0
		} 
		 
	} 
	 
	public int getHistoryItems( Collection<HistoryItem> c ) {
		int size = m_historyQue.size();
		if ( size > 0 ) {
			m_historyQue.drainTo(c);
		} 
		return size;
	} 
	 
	public void addHistoryItem( HistoryItem hi ) {
		m_bProcessInProgress = false;
		try { 
			while ( m_historyQue.size() >= MAX_LOG_MSGS ) {
				m_historyQue.take();
			} 
			m_historyQue.put(hi);
			Log.d("PP30Lite", "^^^ Phone Service History Que Size = " + String.valueOf(m_historyQue.size()) );
		} catch ( Exception e ) {