public void messageSent(DMessage msg){
  int type=msg.getType();
  if (type < 0 || type >= DMessage.OutSIZE)   type=DMessage.OutSIZE;
  long targetIsolate=msg.getTargetIsolate();
  Object outLock=getOutLock();
  if (!m_isolate) {
synchronized (m_isolateLock) {
      if (m_lastIsolate != Isolate.DEFAULT_ID) {
        DMessageCounter counter=m_isolateCounterMap.get(m_lastIsolate);
        outLock=counter.getOutLock();
      }
    }
  }
synchronized (outLock) {
    if (!m_isolate && targetIsolate != Isolate.DEFAULT_ID) {
      DMessageCounter counter=m_isolateCounterMap.get(targetIsolate);
      counter.messageSent(msg);
      m_outCounts[type]+=1;
      outLock.notifyAll();
    }
 else {
      m_outCounts[type]+=1;
      outLock.notifyAll();
    }
  }
}

public void messageSent ( DMessage msg ) { int type = msg . getType ( ) ; if ( type < 0 || type >= DMessage . OutSIZE ) type = DMessage . OutSIZE ; long targetIsolate = msg . getTargetIsolate ( ) ; Object outLock = getOutLock ( ) ; if ( ! m_isolate ) { synchronized ( m_isolateLock ) { if ( m_lastIsolate != Isolate . DEFAULT_ID ) { DMessageCounter counter = m_isolateCounterMap . get ( m_lastIsolate ) ; outLock = counter . getOutLock ( ) ; } } } synchronized ( outLock ) { if ( ! m_isolate && targetIsolate != Isolate . DEFAULT_ID ) { DMessageCounter counter = m_isolateCounterMap . get ( targetIsolate ) ; counter . messageSent ( msg ) ; m_outCounts [ type ] += 1 ; outLock . notifyAll ( ) ; } else { m_outCounts [ type ] += 1 ; outLock . notifyAll ( ) ; } } }
collect stats on outgoing messages
