diff options
author | Marcin Chrzanowski <marcin.j.chrzanowski@gmail.com> | 2020-01-27 17:49:53 +0100 |
---|---|---|
committer | Marcin Chrzanowski <marcin.j.chrzanowski@gmail.com> | 2020-01-27 18:04:25 +0100 |
commit | e3599820c3a2bcd85053f186128ba65d0ceab5a9 (patch) | |
tree | 6bdb61aff734963ee21133f48b9c3284631312be /src/main/java/pl/edu | |
parent | 336a924911fdb6ed832c5245c7f02c2f7556dfba (diff) |
Set leaf contacts regularly
Diffstat (limited to 'src/main/java/pl/edu')
-rw-r--r-- | src/main/java/pl/edu/mimuw/cloudatlas/fetcher/Fetcher.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/pl/edu/mimuw/cloudatlas/fetcher/Fetcher.java b/src/main/java/pl/edu/mimuw/cloudatlas/fetcher/Fetcher.java index 096e4e3..8916b13 100644 --- a/src/main/java/pl/edu/mimuw/cloudatlas/fetcher/Fetcher.java +++ b/src/main/java/pl/edu/mimuw/cloudatlas/fetcher/Fetcher.java @@ -114,9 +114,12 @@ public class Fetcher { api.setFallbackContacts(ClientController.parseContactsString(fallbackContactsString)); ValueContact initialContact = new ValueContact(new PathName(zonePath), InetAddress.getByName(ownAddr)); - api.setAttributeValue(zonePath, "contacts", initialContact); + Set<Value> initialContacts = new HashSet(); + initialContacts.add(initialContact); + ValueSet initialContactsValue = new ValueSet(initialContacts, TypePrimitive.CONTACT); while((jsonAttribs = bufferRead.readLine()) != null) { + api.setAttributeValue(zonePath, "contacts", initialContactsValue); System.out.println(jsonAttribs); System.out.flush(); deserializedAttribs = deserializeAttribs(jsonAttribs); |