Aggregate stats from all cluster nodes and publish
Change-Id: Ic41cdcc8fc17845dabffc42b817b8bb7439a0b52
diff --git a/api/src/main/java/org/opencord/dhcpl2relay/DhcpL2RelayEvent.java b/api/src/main/java/org/opencord/dhcpl2relay/DhcpL2RelayEvent.java
index 596fb6c..a143681 100644
--- a/api/src/main/java/org/opencord/dhcpl2relay/DhcpL2RelayEvent.java
+++ b/api/src/main/java/org/opencord/dhcpl2relay/DhcpL2RelayEvent.java
@@ -33,8 +33,6 @@
private final Map.Entry<String, AtomicLong> countersEntry;
- private final String dhcpCountersTopic;
-
private final String subscriberId;
/**
@@ -64,16 +62,13 @@
* @param allocationInfo DHCP allocation info
* @param connectPoint connect point the client is on
* @param countersEntry an entry that represents the counters (used for STATS events)
- * @param dhcpCountersTopic Kafka topic where the dhcp counters are published
* @param subscriberId the subscriber identifier information
*/
public DhcpL2RelayEvent(Type type, DhcpAllocationInfo allocationInfo, ConnectPoint connectPoint,
- Map.Entry<String, AtomicLong> countersEntry,
- String dhcpCountersTopic, String subscriberId) {
+ Map.Entry<String, AtomicLong> countersEntry, String subscriberId) {
super(type, allocationInfo);
this.connectPoint = connectPoint;
this.countersEntry = countersEntry;
- this.dhcpCountersTopic = dhcpCountersTopic;
this.subscriberId = subscriberId;
}
@@ -88,7 +83,6 @@
super(type, allocationInfo);
this.connectPoint = connectPoint;
this.countersEntry = null;
- this.dhcpCountersTopic = null;
this.subscriberId = null;
}
@@ -111,15 +105,6 @@
}
/**
- * Gets the Kafka topic where the dhcp counters are published.
- *
- * @return the dhcp kafka topic
- */
- public String getDhcpCountersTopic() {
- return dhcpCountersTopic;
- }
-
- /**
* Gets the subscriber identifier information.
*
* @return the Id from subscriber
diff --git a/api/src/main/java/org/opencord/dhcpl2relay/DhcpL2RelayStoreDelegate.java b/api/src/main/java/org/opencord/dhcpl2relay/DhcpL2RelayStoreDelegate.java
new file mode 100644
index 0000000..3ff6a49
--- /dev/null
+++ b/api/src/main/java/org/opencord/dhcpl2relay/DhcpL2RelayStoreDelegate.java
@@ -0,0 +1,24 @@
+/*
+ * Copyright 2020-present Open Networking Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ */
+
+package org.opencord.dhcpl2relay;
+
+import org.onosproject.store.StoreDelegate;
+
+/**
+ * Store delegate for DHCP L2 Relay store.
+ */
+public interface DhcpL2RelayStoreDelegate extends StoreDelegate<DhcpL2RelayEvent> {
+}