Skip to content
Browse files

added JMX information on RetransmiTable to NAKACK

  • Loading branch information...
1 parent 0b26f95 commit 6f0186990323038b36b1c0d6385e5e6a020ffb98 @belaban committed
Showing with 17 additions and 0 deletions.
  1. +12 −0 src/org/jgroups/protocols/pbcast/NAKACK.java
  2. +5 −0 src/org/jgroups/stack/NakReceiverWindow.java
View
12 src/org/jgroups/protocols/pbcast/NAKACK.java
@@ -473,6 +473,18 @@ public String printLossRates() {
return sb.toString();
}
+ @ManagedOperation(description="Returns the sizes of all NakReceiverWindow.RetransmitTables")
+ public String printRetransmitTableSizes() {
+ StringBuilder sb=new StringBuilder();
+ for(Map.Entry<Address,NakReceiverWindow> entry: xmit_table.entrySet()) {
+ NakReceiverWindow win=entry.getValue();
+ sb.append(entry.getKey() + ": ").append(win.getRetransmiTableSize())
+ .append(" (capacity=" + win.getRetransmitTableCapacity() + ")\n");
+ }
+ return sb.toString();
+ }
+
+
@ManagedAttribute
public double getAverageLossRate() {
double retval=0.0;
View
5 src/org/jgroups/stack/NakReceiverWindow.java
@@ -220,6 +220,11 @@ private void setSmoothedLossRate() {
}
+ public int getRetransmiTableSize() {return xmit_table.size();}
+
+ public int getRetransmitTableCapacity() {return xmit_table.capacity();}
+
+
/**
* Adds a message according to its seqno (sequence number).
* <p>

0 comments on commit 6f01869

Please sign in to comment.
Something went wrong with that request. Please try again.