From 42b9d84b2668476510d015b40510fa18a0cffbdd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Magdalena=20Grodzi=C5=84ska?= Date: Tue, 14 Jan 2020 22:54:16 +0100 Subject: Remove TODOs --- .../java/pl/edu/mimuw/cloudatlas/agent/Agent.java | 27 ---------------------- 1 file changed, 27 deletions(-) (limited to 'src/main/java/pl/edu/mimuw/cloudatlas/agent/Agent.java') diff --git a/src/main/java/pl/edu/mimuw/cloudatlas/agent/Agent.java b/src/main/java/pl/edu/mimuw/cloudatlas/agent/Agent.java index 06e067b..d864bd6 100644 --- a/src/main/java/pl/edu/mimuw/cloudatlas/agent/Agent.java +++ b/src/main/java/pl/edu/mimuw/cloudatlas/agent/Agent.java @@ -7,28 +7,6 @@ import pl.edu.mimuw.cloudatlas.model.ZMI; public class Agent { - private static void addZoneAndChildren(ZMI zmi, PathName pathName, EventBus eventBus) { - try { - UpdateAttributesMessage message = new UpdateAttributesMessage("", 0, pathName.toString(), zmi.getAttributes()); - eventBus.addMessage(message); - for (ZMI son : zmi.getSons()) { - addZoneAndChildren(son, pathName.levelDown(son.getAttributes().getOrNull("name").toString()), eventBus); - } - } catch (Exception e) { - System.out.println("ERROR: failed to add zone"); - } - } - - public static void initZones(EventBus eventBus) { - try { - ZMI root = Main.createTestHierarchy2(); - addZoneAndChildren(root, new PathName(""), eventBus); - System.out.println("Initialized with test hierarchy"); - } catch (Exception e) { - System.out.println("ERROR: failed to create test hierarchy"); - } - } - public static void main(String[] args) { AgentConfig agentConfig = new AgentConfig(); @@ -38,10 +16,6 @@ public class Agent { agentConfig.runRegistry(eventBus); agentConfig.startNonModuleThreads(eventBus); - // initZones(eventBus); - - // TODO: make query period confiurable with config file and from tests - String zonePath = System.getProperty("zone_path"); String selectionStrategy = System.getProperty("Gossip.zone_strategy"); Long queryPeriod = Long.getLong("query_period"); @@ -51,7 +25,6 @@ public class Agent { HierarchyConfig hierarchyConfig = new HierarchyConfig(eventBus, zonePath, selectionStrategy); hierarchyConfig.startQueries(queryPeriod); hierarchyConfig.startGossip(gossipPeriod, zonePath); - // TODO: should this be different than ZMI freshness period? hierarchyConfig.startCleaningGossips(freshnessPeriod); } } -- cgit v1.2.3