/** * Sends all messages in the map. Messages for the same destination are bundled into a message list. * The map will be cleared when done. */ @GuardedBy("lock") protected void sendBundledMessages() { for(Map.Entry<Address,List<Message>> entry: msgs.entrySet()) { List<Message> list=entry.getValue(); if(list.isEmpty()) continue; output.position(0); if(list.size() == 1) sendSingleMessage(list.get(0)); else { Address dst=entry.getKey(); sendMessageList(dst, list.get(0).getSrc(), list); if(transport.statsEnabled()) transport.incrBatchesSent(1); } } clearMessages(); count=0; }
protected void _sendBundledMessages() { try { if(target_list.isEmpty()) return; output.position(0); if(target_list.size() == 1) { sendSingleMessage(target_list.get(0)); // avg_batch_size.add(1); } else { avg_batch_size.add(target_list.size()); sendMessageList(target_dest, target_list.get(0).getSrc(), target_list); if(transport.statsEnabled()) transport.incrBatchesSent(1); } } finally { target_list.clear(); count=0; } }
transport.incrBatchesSent(num_msgs);
transport.incrBatchesSent(num_msgs);
transport.incrBatchesSent(num_msgs);
protected void _sendBundledMessages() { try { if(target_list.isEmpty()) return; output.position(0); if(target_list.size() == 1) { sendSingleMessage(target_list.get(0)); // avg_batch_size.add(1); } else { avg_batch_size.add(target_list.size()); sendMessageList(target_dest, target_list.get(0).getSrc(), target_list); if(transport.statsEnabled()) transport.incrBatchesSent(1); } } finally { target_list.clear(); count=0; } }
/** * Sends all messages in the map. Messages for the same destination are bundled into a message list. * The map will be cleared when done. */ @GuardedBy("lock") protected void sendBundledMessages() { for(Map.Entry<Address,List<Message>> entry: msgs.entrySet()) { List<Message> list=entry.getValue(); if(list.isEmpty()) continue; output.position(0); if(list.size() == 1) sendSingleMessage(list.get(0)); else { Address dst=entry.getKey(); sendMessageList(dst, list.get(0).getSrc(), list); if(transport.statsEnabled()) transport.incrBatchesSent(1); } } clearMessages(); count=0; }
transport.incrBatchesSent(num_msgs);
transport.incrBatchesSent(num_msgs);
transport.incrBatchesSent(num_msgs);