mirror of
https://github.com/opennetworkinglab/onos.git
synced 2025-10-15 17:31:31 +02:00
Refactoring of utility methods
- removed unused API to fetch IP addresses - renamed system health API to match other APIs Change-Id: I16f9a1e6e40fd93fb5c0444ab826e2c8738c14ed
This commit is contained in:
parent
a3f21e1439
commit
dc0ff1997e
@ -114,23 +114,6 @@ public class Controller {
|
||||
return FACTORY13;
|
||||
}
|
||||
|
||||
|
||||
public Map<String, String> getControllerNodeIPs() {
|
||||
// We return a copy of the mapping so we can guarantee that
|
||||
// the mapping return is the same as one that will be (or was)
|
||||
// dispatched to IHAListeners
|
||||
HashMap<String, String> retval = new HashMap<>();
|
||||
synchronized (controllerNodeIPsCache) {
|
||||
retval.putAll(controllerNodeIPsCache);
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
||||
public long getSystemStartTime() {
|
||||
return (this.systemStartTime);
|
||||
}
|
||||
|
||||
// **************
|
||||
// Initialization
|
||||
// **************
|
||||
@ -281,11 +264,15 @@ public class Controller {
|
||||
}
|
||||
|
||||
|
||||
public Long getUptime() {
|
||||
public Long getSystemUptime() {
|
||||
RuntimeMXBean rb = ManagementFactory.getRuntimeMXBean();
|
||||
return rb.getUptime();
|
||||
}
|
||||
|
||||
public long getSystemStartTime() {
|
||||
return (this.systemStartTime);
|
||||
}
|
||||
|
||||
/**
|
||||
* Forward to the driver-manager to get an IOFSwitch instance.
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user