@Test public void testIncrementOrderDoesntMatter() { int numTests = 10; int numNodes = 10; int numValues = 100; VectorClock[] clocks = new VectorClock[numNodes]; for(int t = 0; t < numTests; t++) { int[] test = randomInts(numNodes, numValues); for(int n = 0; n < numNodes; n++) clocks[n] = getClock(shuffle(test)); for(int n = 0; n < numNodes - 1; n++) assertEquals("Clock " + n + " and " + (n + 1) + " are not equal.", clocks[n].getEntries(), clocks[n + 1].getEntries()); } }
public List<ClockEntry> getEntries() { return Collections.unmodifiableList(this.versions); }
VectorClock implements IVersion, Serializable, Cloneable { public List<ClockEntry> getEntries() { return Collections.unmodifiableList(this.versions); } }
VectorClock implements IVersion, Serializable, Cloneable { public List<ClockEntry> getEntries() { return Collections.unmodifiableList(this.versions); } VectorClock();  VectorClock(long timestamp); @JsonCreator  VectorClock(@JsonProperty("entries") List<ClockEntry> versions, 
                       @JsonProperty("timestamp") long timestamp); }
VectorClock implements IVersion, Serializable, Cloneable { public List<ClockEntry> getEntries() { return Collections.unmodifiableList(this.versions); } VectorClock();  VectorClock(long timestamp); @JsonCreator  VectorClock(@JsonProperty("entries") List<ClockEntry> versions, 
                       @JsonProperty("timestamp") long timestamp); VectorClock incremented(int nodeId, long time); @Override VectorClock clone(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(); @JsonIgnore long getMaxVersion(); VectorClock merge(VectorClock clock); @Override Occurred compare(IVersion v); static Occurred compare(VectorClock v1, VectorClock v2); long getTimestamp(); List<ClockEntry> getEntries(); }
VectorClock implements IVersion, Serializable, Cloneable { public List<ClockEntry> getEntries() { return Collections.unmodifiableList(this.versions); } VectorClock();  VectorClock(long timestamp); @JsonCreator  VectorClock(@JsonProperty("entries") List<ClockEntry> versions, 
                       @JsonProperty("timestamp") long timestamp); VectorClock incremented(int nodeId, long time); @Override VectorClock clone(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(); @JsonIgnore long getMaxVersion(); VectorClock merge(VectorClock clock); @Override Occurred compare(IVersion v); static Occurred compare(VectorClock v1, VectorClock v2); long getTimestamp(); List<ClockEntry> getEntries();  }