diff options
author | Martin <marcin.j.chrzanowski@gmail.com> | 2020-01-12 22:32:59 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-12 22:32:59 +0100 |
commit | 0f31d1f5c267f893d765ccd848b95fc111009de5 (patch) | |
tree | cf54497163b95e32fc8932b0ba13acc3fe2ca503 /src/main/java/pl/edu/mimuw/cloudatlas/agent/AgentConfig.java | |
parent | 32bfe8f7efc1f4fb99ddf827a19ab466724dac06 (diff) | |
parent | cd247e8d64b2ef0aed7f0afdccd711008cd60fcd (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.java | 4 |
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()); |