示例#1
0
 synchronized void deRegister(SendPort p) {
   if (sendPorts.remove(p.name) != null) {
     // add statistics for this sendport to "total" statistics
     outgoingMessageCount += p.getMessageCount();
     bytesSent += p.getBytesSent();
     bytesWritten += p.getBytesWritten();
   }
 }
示例#2
0
  public synchronized long getOutgoingMessageCount() {
    long outgoingMessageCount = this.outgoingMessageCount;

    // also add numbers for current send ports
    for (SendPort sendPort : sendPorts.values()) {
      outgoingMessageCount += sendPort.getMessageCount();
    }

    return outgoingMessageCount;
  }