summaryrefslogtreecommitdiffstats
path: root/src/main/java/com/gitblit/fanout/FanoutStats.java
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2013-09-30 09:30:04 -0400
committerJames Moger <james.moger@gitblit.com>2013-09-30 10:11:28 -0400
commit699e71e76b15081baf746c6ce9c9144f7e5f1ff9 (patch)
tree4a9ea25c258caeae3dea4bc1de809f47bc615d81 /src/main/java/com/gitblit/fanout/FanoutStats.java
parent235ad956fa84cad4fac1b2e69a0c9e4f50376ea3 (diff)
downloadgitblit-699e71e76b15081baf746c6ce9c9144f7e5f1ff9.tar.gz
gitblit-699e71e76b15081baf746c6ce9c9144f7e5f1ff9.zip
Trim trailing whitespace and organize imports
Change-Id: I9f91138b20219be6e3c4b28251487df262bff6cc
Diffstat (limited to 'src/main/java/com/gitblit/fanout/FanoutStats.java')
-rw-r--r--src/main/java/com/gitblit/fanout/FanoutStats.java16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/main/java/com/gitblit/fanout/FanoutStats.java b/src/main/java/com/gitblit/fanout/FanoutStats.java
index b06884d3..3545472f 100644
--- a/src/main/java/com/gitblit/fanout/FanoutStats.java
+++ b/src/main/java/com/gitblit/fanout/FanoutStats.java
@@ -21,18 +21,18 @@ import java.util.Date;
/**
* Encapsulates the runtime stats of a fanout service.
- *
+ *
* @author James Moger
*
*/
public class FanoutStats implements Serializable {
private static final long serialVersionUID = 1L;
-
+
public long concurrentConnectionLimit;
public boolean allowAllChannelAnnouncements;
public boolean strictRequestTermination;
-
+
public Date bootDate;
public long rejectedConnectionCount;
public int peakConnectionCount;
@@ -45,7 +45,7 @@ public class FanoutStats implements Serializable {
public long totalSubscribes;
public long totalUnsubscribes;
public long totalPings;
-
+
public String info() {
int i = 0;
StringBuilder sb = new StringBuilder();
@@ -67,14 +67,14 @@ public class FanoutStats implements Serializable {
sb.append(infoInt(i++, "total pings"));
String template = sb.toString();
- String info = MessageFormat.format(template,
+ String info = MessageFormat.format(template,
bootDate.toString(),
Boolean.toString(strictRequestTermination),
Boolean.toString(allowAllChannelAnnouncements),
concurrentConnectionLimit,
rejectedConnectionCount,
peakConnectionCount,
- currentConnections,
+ currentConnections,
currentChannels,
currentSubscriptions,
currentSubscriptions == 0 ? 0 : (currentSubscriptions - currentConnections),
@@ -86,11 +86,11 @@ public class FanoutStats implements Serializable {
totalPings);
return info;
}
-
+
private String infoStr(int index, String label) {
return label + ": {" + index + "}\n";
}
-
+
private String infoInt(int index, String label) {
return label + ": {" + index + ",number,0}\n";
}