mirror of
https://github.com/Telecominfraproject/wlan-cloud-opensync-controller.git
synced 2025-11-01 19:17:52 +00:00
[WIFI-3165] Keep last stats received timestamp in gateway client session map
Signed-off-by: Mike Hansen <mike.hansen@connectus.ai>
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package com.telecominfraproject.wlan.opensync.external.integration;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
import com.vmware.ovsdb.service.OvsdbClient;
|
||||
|
||||
public class OvsdbSession {
|
||||
@@ -7,7 +9,7 @@ public class OvsdbSession {
|
||||
private String apId;
|
||||
private long routingId;
|
||||
private long equipmentId;
|
||||
private int customerId;
|
||||
private long mostRecentStatsTimestamp;
|
||||
|
||||
public OvsdbClient getOvsdbClient() {
|
||||
return ovsdbClient;
|
||||
@@ -33,5 +35,34 @@ public class OvsdbSession {
|
||||
public void setEquipmentId(long equipmentId) {
|
||||
this.equipmentId = equipmentId;
|
||||
}
|
||||
public long getMostRecentStatsTimestamp() {
|
||||
return mostRecentStatsTimestamp;
|
||||
}
|
||||
public void setMostRecentStatsTimestamp(long mostRecentStatsTimestamp) {
|
||||
this.mostRecentStatsTimestamp = mostRecentStatsTimestamp;
|
||||
}
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(apId, equipmentId, mostRecentStatsTimestamp, ovsdbClient, routingId);
|
||||
}
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj)
|
||||
return true;
|
||||
if (obj == null)
|
||||
return false;
|
||||
if (getClass() != obj.getClass())
|
||||
return false;
|
||||
OvsdbSession other = (OvsdbSession) obj;
|
||||
return Objects.equals(apId, other.apId) && equipmentId == other.equipmentId && mostRecentStatsTimestamp == other.mostRecentStatsTimestamp
|
||||
&& Objects.equals(ovsdbClient, other.ovsdbClient) && routingId == other.routingId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "OvsdbSession [ovsdbClient=" + ovsdbClient + ", apId=" + apId + ", routingId=" + routingId + ", equipmentId=" + equipmentId
|
||||
+ ", mostRecentStatsTimestamp=" + mostRecentStatsTimestamp + "]";
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user