Skip to content

Commit

Permalink
TP.enableAllStats(): enables/disabled all stats in all protocols
Browse files Browse the repository at this point in the history
  • Loading branch information
belaban committed Aug 30, 2024
1 parent c685e5c commit f322e34
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/org/jgroups/protocols/TP.java
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,6 @@ else if(policy.startsWith("unbatch"))
@Component(name="msg_stats")
protected final MsgStats msg_stats=new MsgStats().enable(stats);


/** The name of the group to which this member is connected. With a shared transport, the channel name is
* in TP.ProtocolAdapter (cluster_name), and this field is not used */
@ManagedAttribute(description="Channel (cluster) name")
Expand Down Expand Up @@ -343,6 +342,12 @@ public <T extends TP> T clearDifferentVersionCache() {
return (T)this;
}

@ManagedOperation(description="Enabled or disabled all stats in all protocols")
public void enableAllStats(boolean flag) {
for(Protocol p=this; p != null; p=p.getUpProtocol()) {
p.enableStats(flag);
}
}

@ManagedAttribute(description="Type of logger used")
public static String loggerType() {return LogFactory.loggerType();}
Expand Down

0 comments on commit f322e34

Please sign in to comment.