mirror of
https://github.com/opennetworkinglab/onos.git
synced 2025-10-24 22:01:02 +02:00
Removing classic-topo-view heartbeat event.
Change-Id: Id0271b2b6b46a5b491b6adffb2bdadd87623d50b
This commit is contained in:
parent
05e47a3d00
commit
45cd726976
@ -119,7 +119,6 @@ public class TopologyViewMessageHandler extends TopologyViewMessageHandlerBase {
|
|||||||
private static final String SPRITE_LIST_REQ = "spriteListRequest";
|
private static final String SPRITE_LIST_REQ = "spriteListRequest";
|
||||||
private static final String SPRITE_DATA_REQ = "spriteDataRequest";
|
private static final String SPRITE_DATA_REQ = "spriteDataRequest";
|
||||||
private static final String TOPO_START = "topoStart";
|
private static final String TOPO_START = "topoStart";
|
||||||
private static final String TOPO_HEARTBEAT = "topoHeartbeat";
|
|
||||||
private static final String TOPO_SELECT_OVERLAY = "topoSelectOverlay";
|
private static final String TOPO_SELECT_OVERLAY = "topoSelectOverlay";
|
||||||
private static final String TOPO_STOP = "topoStop";
|
private static final String TOPO_STOP = "topoStop";
|
||||||
|
|
||||||
@ -210,7 +209,6 @@ public class TopologyViewMessageHandler extends TopologyViewMessageHandlerBase {
|
|||||||
protected Collection<RequestHandler> createRequestHandlers() {
|
protected Collection<RequestHandler> createRequestHandlers() {
|
||||||
return ImmutableSet.of(
|
return ImmutableSet.of(
|
||||||
new TopoStart(),
|
new TopoStart(),
|
||||||
new TopoHeartbeat(),
|
|
||||||
new TopoSelectOverlay(),
|
new TopoSelectOverlay(),
|
||||||
new TopoStop(),
|
new TopoStop(),
|
||||||
new ReqSummary(),
|
new ReqSummary(),
|
||||||
@ -267,17 +265,6 @@ public class TopologyViewMessageHandler extends TopologyViewMessageHandlerBase {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private final class TopoHeartbeat extends RequestHandler {
|
|
||||||
private TopoHeartbeat() {
|
|
||||||
super(TOPO_HEARTBEAT);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void process(long sid, ObjectNode payload) {
|
|
||||||
// place holder for now
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private final class TopoSelectOverlay extends RequestHandler {
|
private final class TopoSelectOverlay extends RequestHandler {
|
||||||
private TopoSelectOverlay() {
|
private TopoSelectOverlay() {
|
||||||
super(TOPO_SELECT_OVERLAY);
|
super(TOPO_SELECT_OVERLAY);
|
||||||
|
|||||||
@ -31,10 +31,7 @@
|
|||||||
|
|
||||||
// internal state
|
// internal state
|
||||||
var handlerMap,
|
var handlerMap,
|
||||||
openListener,
|
openListener;
|
||||||
heartbeatTimer;
|
|
||||||
|
|
||||||
var heartbeatPeriod = 9000; // 9 seconds
|
|
||||||
|
|
||||||
// ==========================
|
// ==========================
|
||||||
|
|
||||||
@ -74,20 +71,6 @@
|
|||||||
wss.sendEvent('topoStart');
|
wss.sendEvent('topoStart');
|
||||||
}
|
}
|
||||||
|
|
||||||
function cancelHeartbeat() {
|
|
||||||
if (heartbeatTimer) {
|
|
||||||
$interval.cancel(heartbeatTimer);
|
|
||||||
}
|
|
||||||
heartbeatTimer = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
function scheduleHeartbeat() {
|
|
||||||
cancelHeartbeat();
|
|
||||||
heartbeatTimer = $interval(function () {
|
|
||||||
wss.sendEvent('topoHeartbeat');
|
|
||||||
}, heartbeatPeriod);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
angular.module('ovTopo')
|
angular.module('ovTopo')
|
||||||
.factory('TopoEventService',
|
.factory('TopoEventService',
|
||||||
@ -118,12 +101,10 @@
|
|||||||
// in case we fail over to a new server, listen for wsock-open
|
// in case we fail over to a new server, listen for wsock-open
|
||||||
openListener = wss.addOpenListener(wsOpen);
|
openListener = wss.addOpenListener(wsOpen);
|
||||||
wss.sendEvent('topoStart');
|
wss.sendEvent('topoStart');
|
||||||
scheduleHeartbeat();
|
|
||||||
$log.debug('topo comms started');
|
$log.debug('topo comms started');
|
||||||
}
|
}
|
||||||
|
|
||||||
function stop() {
|
function stop() {
|
||||||
cancelHeartbeat();
|
|
||||||
wss.sendEvent('topoStop');
|
wss.sendEvent('topoStop');
|
||||||
wss.unbindHandlers(handlerMap);
|
wss.unbindHandlers(handlerMap);
|
||||||
wss.removeOpenListener(openListener);
|
wss.removeOpenListener(openListener);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user