Code example for ConcurrentLinkedQueue

Methods: add

0
    } 
 
    @Override 
    protected void postProcessesReceivedMessage(int threadIndex, int i, TextMessage message, int globalMsgReceivedIndex) {
        try { 
            receivedMessage.add(Long.valueOf(message.getText()));
        } catch (Exception e) {
            e.printStackTrace();
        } 
    } 
 
    /** 
     * @param args 
     * @throws InterruptedException 
     */ 
    public static void main(String[] args) throws Exception {
        MultithreadedDuplicationAndLossTest base = new MultithreadedDuplicationAndLossTest();
        int producerCount = 2;
        int consumerCount = 2;
        int queueCount = 30;