m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/pl/edu/mimuw/cloudatlas/agent/AgentConfig.java
diff options
context:
space:
mode:
authorMartin <marcin.j.chrzanowski@gmail.com>2020-01-12 22:32:59 +0100
committerGitHub <noreply@github.com>2020-01-12 22:32:59 +0100
commit0f31d1f5c267f893d765ccd848b95fc111009de5 (patch)
treecf54497163b95e32fc8932b0ba13acc3fe2ca503 /src/main/java/pl/edu/mimuw/cloudatlas/agent/AgentConfig.java
parent32bfe8f7efc1f4fb99ddf827a19ab466724dac06 (diff)
parentcd247e8d64b2ef0aed7f0afdccd711008cd60fcd (diff)
Merge pull request #116 from m-chrzan/required-attributes
Required attributes
Diffstat (limited to 'src/main/java/pl/edu/mimuw/cloudatlas/agent/AgentConfig.java')
-rw-r--r--src/main/java/pl/edu/mimuw/cloudatlas/agent/AgentConfig.java4
1 files changed, 3 insertions, 1 deletions
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 38d764a..e9bbf4e 100644
--- a/src/main/java/pl/edu/mimuw/cloudatlas/agent/AgentConfig.java
+++ b/src/main/java/pl/edu/mimuw/cloudatlas/agent/AgentConfig.java
@@ -3,6 +3,7 @@ package pl.edu.mimuw.cloudatlas.agent;
import pl.edu.mimuw.cloudatlas.agent.modules.*;
import pl.edu.mimuw.cloudatlas.agent.modules.Module;
import pl.edu.mimuw.cloudatlas.api.Api;
+import pl.edu.mimuw.cloudatlas.model.PathName;
import java.net.InetAddress;
import java.net.SocketException;
@@ -43,11 +44,12 @@ public class AgentConfig {
Integer timeout = Integer.getInteger("UDUPServer.timeout");
Integer bufsize = Integer.getInteger("UDUPServer.bufsize");
InetAddress serverAddr = InetAddress.getByName(System.getProperty("UDUPServer.hostname"));
+ String ourPath = System.getProperty("zone_path");
HashMap<ModuleType, Module> modules = new HashMap<ModuleType, Module>();
modules.put(ModuleType.TIMER_SCHEDULER, new TimerScheduler(ModuleType.TIMER_SCHEDULER));
modules.put(ModuleType.RMI, new Remik());
- modules.put(ModuleType.STATE, new Stanik(freshnessPeriod));
+ modules.put(ModuleType.STATE, new Stanik(new PathName(ourPath), freshnessPeriod));
modules.put(ModuleType.QUERY, new Qurnik());
modules.put(ModuleType.GOSSIP, new GossipGirl());