Code example for LinkedBlockingQueue

Methods: offer

0
     
    public void transfer(int taskid, Tuple tuple) { 
        byte [] tupleMessage = serializer.serialize(tuple); 
        byte [] sendMessage = PacketPair.mk_packet((short)taskid, tupleMessage); 
        TransferData tData = new TransferData(taskid, sendMessage); 
        transferQueue.offer(tData); 
    } 
     
}