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(); } }
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; }