Aggregate stats from all cluster nodes and publish
Change-Id: Ic41cdcc8fc17845dabffc42b817b8bb7439a0b52
diff --git a/app/src/main/java/org/opencord/dhcpl2relay/impl/DhcpL2RelayCountersIdentifier.java b/app/src/main/java/org/opencord/dhcpl2relay/impl/DhcpL2RelayCountersIdentifier.java
index 63587e1..d6c7ef9 100644
--- a/app/src/main/java/org/opencord/dhcpl2relay/impl/DhcpL2RelayCountersIdentifier.java
+++ b/app/src/main/java/org/opencord/dhcpl2relay/impl/DhcpL2RelayCountersIdentifier.java
@@ -24,14 +24,14 @@
*/
public final class DhcpL2RelayCountersIdentifier {
final String counterClassKey;
- final Enum<DhcpL2RelayCounters> counterTypeKey;
+ final Enum<DhcpL2RelayCounterNames> counterTypeKey;
/**
* Creates a default global counter identifier for a given counterType.
*
* @param counterTypeKey Identifies the supported type of DHCP relay counters
*/
- public DhcpL2RelayCountersIdentifier(DhcpL2RelayCounters counterTypeKey) {
+ public DhcpL2RelayCountersIdentifier(DhcpL2RelayCounterNames counterTypeKey) {
this.counterClassKey = DhcpL2RelayEvent.GLOBAL_COUNTER;
this.counterTypeKey = counterTypeKey;
}
@@ -43,7 +43,7 @@
* @param counterClassKey Identifies which class the counter is assigned (global or per subscriber)
* @param counterTypeKey Identifies the supported type of DHCP relay counters
*/
- public DhcpL2RelayCountersIdentifier(String counterClassKey, DhcpL2RelayCounters counterTypeKey) {
+ public DhcpL2RelayCountersIdentifier(String counterClassKey, DhcpL2RelayCounterNames counterTypeKey) {
this.counterClassKey = counterClassKey;
this.counterTypeKey = counterTypeKey;
}
@@ -66,4 +66,8 @@
public int hashCode() {
return Objects.hash(counterClassKey, counterTypeKey);
}
+
+ public String toString() {
+ return this.counterClassKey + "/" + this.counterTypeKey;
+ }
}
\ No newline at end of file