m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/pl
diff options
context:
space:
mode:
authorMagdalena GrodziƄska <mag.grodzinska@gmail.com>2020-01-14 23:05:06 +0100
committerGitHub <noreply@github.com>2020-01-14 23:05:06 +0100
commit7972afc9cab164615116f494e6824b88f8f873a7 (patch)
treec1ac0ebff3d5e980d85e841de75aacbe891b8f37 /src/main/java/pl
parent47ff68f0535f90eb4b09cb8c9c88555abd900cc8 (diff)
parent42b9d84b2668476510d015b40510fa18a0cffbdd (diff)
Merge pull request #120 from m-chrzan/final_fixes
Remove TODOs
Diffstat (limited to 'src/main/java/pl')
-rw-r--r--src/main/java/pl/edu/mimuw/cloudatlas/ByteSerializer.java1
-rw-r--r--src/main/java/pl/edu/mimuw/cloudatlas/agent/Agent.java27
-rw-r--r--src/main/java/pl/edu/mimuw/cloudatlas/agent/AgentConfig.java1
-rw-r--r--src/main/java/pl/edu/mimuw/cloudatlas/agent/HierarchyConfig.java1
-rw-r--r--src/main/java/pl/edu/mimuw/cloudatlas/agent/modules/GossipGirlState.java2
-rw-r--r--src/main/java/pl/edu/mimuw/cloudatlas/agent/modules/TimerScheduler.java2
6 files changed, 0 insertions, 34 deletions
diff --git a/src/main/java/pl/edu/mimuw/cloudatlas/ByteSerializer.java b/src/main/java/pl/edu/mimuw/cloudatlas/ByteSerializer.java
index ee7a6f0..94c8d65 100644
--- a/src/main/java/pl/edu/mimuw/cloudatlas/ByteSerializer.java
+++ b/src/main/java/pl/edu/mimuw/cloudatlas/ByteSerializer.java
@@ -25,7 +25,6 @@ import java.util.LinkedHashMap;
/**
* Serializes classes to and from byte arrays
*/
-// TODO remove udupserializer
public class ByteSerializer {
private Kryo kryo;
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);
}
}
diff --git a/src/main/java/pl/edu/mimuw/cloudatlas/agent/AgentConfig.java b/src/main/java/pl/edu/mimuw/cloudatlas/agent/AgentConfig.java
index e9bbf4e..2363f4b 100644
--- a/src/main/java/pl/edu/mimuw/cloudatlas/agent/AgentConfig.java
+++ b/src/main/java/pl/edu/mimuw/cloudatlas/agent/AgentConfig.java
@@ -38,7 +38,6 @@ public class AgentConfig {
}
private HashMap<ModuleType, Module> initializeModules() throws UnknownHostException, SocketException, NullPointerException {
- // TODO config setup
Long freshnessPeriod = Long.getLong("freshness_period");
Integer port = Integer.getInteger("UDUPServer.port");
Integer timeout = Integer.getInteger("UDUPServer.timeout");
diff --git a/src/main/java/pl/edu/mimuw/cloudatlas/agent/HierarchyConfig.java b/src/main/java/pl/edu/mimuw/cloudatlas/agent/HierarchyConfig.java
index 92b7f66..2f04a25 100644
--- a/src/main/java/pl/edu/mimuw/cloudatlas/agent/HierarchyConfig.java
+++ b/src/main/java/pl/edu/mimuw/cloudatlas/agent/HierarchyConfig.java
@@ -79,7 +79,6 @@ public class HierarchyConfig {
return selectContactFromSet(valueSet);
}
- // TODO
private ValueContact selectFallbackContact(Set<ValueContact> contacts) throws Exception {
if (contacts.isEmpty()) {
return null;
diff --git a/src/main/java/pl/edu/mimuw/cloudatlas/agent/modules/GossipGirlState.java b/src/main/java/pl/edu/mimuw/cloudatlas/agent/modules/GossipGirlState.java
index 4709eb1..d5c404d 100644
--- a/src/main/java/pl/edu/mimuw/cloudatlas/agent/modules/GossipGirlState.java
+++ b/src/main/java/pl/edu/mimuw/cloudatlas/agent/modules/GossipGirlState.java
@@ -312,7 +312,6 @@ public class GossipGirlState {
}
break;
case WAIT_FOR_FIRST_INFO:
- // TODO: use offset to setup GTP
offset = message.getOffset();
setZonesToSend();
setQueriesToSend();
@@ -336,7 +335,6 @@ public class GossipGirlState {
public void gotQuery(QueryMessage message) {
switch (state) {
case WAIT_FOR_FIRST_INFO:
- // TODO: use offset to setup GTP
offset = message.getOffset();
setZonesToSend();
setQueriesToSend();
diff --git a/src/main/java/pl/edu/mimuw/cloudatlas/agent/modules/TimerScheduler.java b/src/main/java/pl/edu/mimuw/cloudatlas/agent/modules/TimerScheduler.java
index 68a9326..b9a68bd 100644
--- a/src/main/java/pl/edu/mimuw/cloudatlas/agent/modules/TimerScheduler.java
+++ b/src/main/java/pl/edu/mimuw/cloudatlas/agent/modules/TimerScheduler.java
@@ -13,7 +13,6 @@ import java.util.Timer;
* Handle used to attach tasks to schedule
* Tasks declared as inherited from TimerTask
*
- * TODO: add request id and custom time
*/
public class TimerScheduler extends Module {
private Timer timer;
@@ -37,7 +36,6 @@ public class TimerScheduler extends Module {
System.out.println("Task with delay " + msg.getDelay() + " scheduled");
}
- // TODO
public void removeTask(String requestId) {}
public void passMessageFromTask(AgentMessage msg) throws InterruptedException {