*/
public static void atomicSetMax(AtomicReference<IClock> atomic, IClock newClock)
{
while (true)
{
IClock oldClock = atomic.get();
ClockRelationship rel = oldClock.compare(newClock);
if (rel == ClockRelationship.DISJOINT)
{
newClock = oldClock.getSuperset(Arrays.asList(newClock));
}
if (rel == ClockRelationship.GREATER_THAN || rel == ClockRelationship.EQUAL
|| atomic.compareAndSet(oldClock, newClock))
break;
}