@Test public void testSets () { Protocol.Session session = testSession(); TestDB one = new TestDB(), two = new TestDB(); one.unionSet.add("one"); one.unionSet.add("two"); one.interSet.add("1"); one.interSet.add("2"); one.serverSet.add("a"); one.serverSet.add("b"); session.sync(one); session.sync(two); one.unionSet.add("three"); two.unionSet.add("four"); one.interSet.remove("1"); two.interSet.add("3"); one.serverSet.add("c"); two.serverSet.remove("b"); session.sync(one); session.sync(two); session.sync(one); one.assertEquals(two); assertEquals(Sets.newHashSet("one", "two", "three", "four"), two.unionSet); assertEquals(Sets.newHashSet("2"), two.interSet); assertEquals(Sets.newHashSet("a", "b", "c"), two.serverSet); one.assertEquals(one.clone()); assertEquals(0, one.getMods().size()); assertEquals(0, two.getMods().size()); }
public Map<String,Integer> getMods () { return new HashMap<String,Integer>(_mods); }
SyncDB { public Map<String,Integer> getMods () { return new HashMap<String,Integer>(_mods); } }
SyncDB { public Map<String,Integer> getMods () { return new HashMap<String,Integer>(_mods); } protected  SyncDB(Platform platform); }
SyncDB { public Map<String,Integer> getMods () { return new HashMap<String,Integer>(_mods); } protected  SyncDB(Platform platform); int version(); boolean hasUnsyncedChanges(); Map<String,String> getDelta(); Map<String,Integer> getMods(); void noteSync(int version, Map<String,Integer> syncedMods); boolean containsMerges(Map<String,String> delta); void applyDelta(int version, Map<String,String> delta); void prepareToMeld(); void processPurges(); }
SyncDB { public Map<String,Integer> getMods () { return new HashMap<String,Integer>(_mods); } protected  SyncDB(Platform platform); int version(); boolean hasUnsyncedChanges(); Map<String,String> getDelta(); Map<String,Integer> getMods(); void noteSync(int version, Map<String,Integer> syncedMods); boolean containsMerges(Map<String,String> delta); void applyDelta(int version, Map<String,String> delta); void prepareToMeld(); void processPurges();  }