|
125 | 125 | @Component |
126 | 126 | public class StatsCollector extends ManagerBase implements ComponentMethodInterceptable { |
127 | 127 |
|
128 | | - public static enum externalStatsProtocol { |
| 128 | + public static enum ExternalStatsProtocol { |
129 | 129 | NONE("none"), GRAPHITE("graphite"); |
130 | 130 | String _type; |
131 | 131 |
|
132 | | - externalStatsProtocol(String type) { |
| 132 | + ExternalStatsProtocol(String type) { |
133 | 133 | _type = type; |
134 | 134 | } |
135 | 135 |
|
@@ -218,7 +218,7 @@ public String toString() { |
218 | 218 | String externalStatsHost = null; |
219 | 219 | int externalStatsPort = -1; |
220 | 220 | boolean externalStatsEnabled = false; |
221 | | - externalStatsProtocol externalStatsType = externalStatsProtocol.NONE; |
| 221 | + ExternalStatsProtocol externalStatsType = ExternalStatsProtocol.NONE; |
222 | 222 |
|
223 | 223 | private ScheduledExecutorService _diskStatsUpdateExecutor; |
224 | 224 | private int _usageAggregationRange = 1440; |
@@ -266,7 +266,7 @@ private void init(Map<String, String> configs) { |
266 | 266 | String scheme = uri.getScheme(); |
267 | 267 |
|
268 | 268 | try { |
269 | | - externalStatsType = externalStatsProtocol.valueOf(scheme.toUpperCase()); |
| 269 | + externalStatsType = ExternalStatsProtocol.valueOf(scheme.toUpperCase()); |
270 | 270 | } catch (IllegalArgumentException e) { |
271 | 271 | s_logger.info(scheme + " is not a valid protocol for external statistics. No statistics will be send."); |
272 | 272 | } |
@@ -492,7 +492,7 @@ protected void runInContext() { |
492 | 492 | * Currently only Graphite is supported |
493 | 493 | */ |
494 | 494 | if (!metrics.isEmpty()) { |
495 | | - if (externalStatsType != null && externalStatsType == externalStatsProtocol.GRAPHITE) { |
| 495 | + if (externalStatsType != null && externalStatsType == ExternalStatsProtocol.GRAPHITE) { |
496 | 496 |
|
497 | 497 | if (externalStatsPort == -1) { |
498 | 498 | externalStatsPort = 2003; |
|
0 commit comments