Code example for BlockingQueue

Methods: size

0
    int m_gpsDataSendSuccess = 0;
    int m_gpsDataSendFail = 0;
    int m_gpsDataDrop = 0;
    int getGpsDataQueueCount() 
    { 
        return m_sendLocations.size();
    } 
    private void resetStat() { 
        m_gpsDataAll = 0;
        m_gpsDataSendSuccess = 0;
        m_gpsDataSendFail = 0;
        m_gpsDataDrop = 0;
    } 
 
    private synchronized void StartThreadSendGpsData() { 
        if (!m_config.getIsUseWebService())
            return; 
 
        if (m_threadSendGpsData != null && m_threadSendGpsData.isAlive()
                && !m_threadSendGpsData.isInterrupted())
            return;