Code example for LinkedBlockingQueue

Methods: drainTosize

0
		} 
		return m_handler;
	} 
	 
	public int getLogMsgs( Collection<LogMsg> c ) {
		int size = m_logQue.size();
		if ( size > 0 ) {
			m_logQue.drainTo(c);
		} 
		return size;
	} 
 
 
	public void addLogMsg( String s, LogMsg.TYPE t, LogMsg.CAT c ) {
		try { 
			while ( m_logQue.size() >= MAX_LOG_MSGS ) {
				m_logQue.take();
			} 
			m_logQue.put(new LogMsg(s, t, c));
		} catch ( Exception e ) {
Stop searching for code, let great code find you!  Add Codota to your java IDE