Removing classic-topo-view heartbeat event.

Change-Id: Id0271b2b6b46a5b491b6adffb2bdadd87623d50b
This commit is contained in:
Simon Hunt 2016-10-24 11:43:05 -07:00
parent 05e47a3d00
commit 45cd726976
2 changed files with 1 additions and 33 deletions

View File

@ -119,7 +119,6 @@ public class TopologyViewMessageHandler extends TopologyViewMessageHandlerBase {
private static final String SPRITE_LIST_REQ = "spriteListRequest";
private static final String SPRITE_DATA_REQ = "spriteDataRequest";
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_STOP = "topoStop";
@ -210,7 +209,6 @@ public class TopologyViewMessageHandler extends TopologyViewMessageHandlerBase {
protected Collection<RequestHandler> createRequestHandlers() {
return ImmutableSet.of(
new TopoStart(),
new TopoHeartbeat(),
new TopoSelectOverlay(),
new TopoStop(),
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 TopoSelectOverlay() {
super(TOPO_SELECT_OVERLAY);

View File

@ -31,10 +31,7 @@
// internal state
var handlerMap,
openListener,
heartbeatTimer;
var heartbeatPeriod = 9000; // 9 seconds
openListener;
// ==========================
@ -74,20 +71,6 @@
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')
.factory('TopoEventService',
@ -118,12 +101,10 @@
// in case we fail over to a new server, listen for wsock-open
openListener = wss.addOpenListener(wsOpen);
wss.sendEvent('topoStart');
scheduleHeartbeat();
$log.debug('topo comms started');
}
function stop() {
cancelHeartbeat();
wss.sendEvent('topoStop');
wss.unbindHandlers(handlerMap);
wss.removeOpenListener(openListener);