org.sdnplatform.sync.internal.version
Class VectorClockInconsistencyResolver<T>
java.lang.Object
org.sdnplatform.sync.internal.version.VectorClockInconsistencyResolver<T>
- All Implemented Interfaces:
- IInconsistencyResolver<Versioned<T>>
public class VectorClockInconsistencyResolver<T>
- extends java.lang.Object
- implements IInconsistencyResolver<Versioned<T>>
An inconsistency resolver that uses the object VectorClocks leaving only a
set of concurrent versions remaining.
Method Summary |
boolean |
equals(java.lang.Object o)
|
int |
hashCode()
|
java.util.List<Versioned<T>> |
resolveConflicts(java.util.List<Versioned<T>> items)
Take two different versions of an object and combine them into a single
version of the object Implementations must maintain the contract that
resolveConflict([null, null]) == null
if t != null , then
resolveConflict([null, t]) == resolveConflict([t, null]) == t |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
VectorClockInconsistencyResolver
public VectorClockInconsistencyResolver()
resolveConflicts
public java.util.List<Versioned<T>> resolveConflicts(java.util.List<Versioned<T>> items)
- Description copied from interface:
IInconsistencyResolver
- Take two different versions of an object and combine them into a single
version of the object Implementations must maintain the contract that
-
resolveConflict([null, null]) == null
-
if
t != null
, then
resolveConflict([null, t]) == resolveConflict([t, null]) == t
- Specified by:
resolveConflicts
in interface IInconsistencyResolver<Versioned<T>>
- Parameters:
items
- The items to be resolved
- Returns:
- The united object
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object