org.sdnplatform.sync
Class Versioned<T>
java.lang.Object
org.sdnplatform.sync.Versioned<T>
- All Implemented Interfaces:
- java.io.Serializable
- Direct Known Subclasses:
- VCVersioned
public class Versioned<T>
- extends java.lang.Object
- implements java.io.Serializable
A wrapper for an object that adds a Version.
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Versioned
public Versioned(T object)
Versioned
public Versioned(T object,
IVersion version)
getVersion
public IVersion getVersion()
increment
public void increment(int nodeId,
long time)
getValue
public T getValue()
setValue
public void setValue(T 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
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
cloneVersioned
public Versioned<T> cloneVersioned()
- Create a clone of this Versioned object such that the object pointed to
is the same, but the VectorClock and Versioned wrapper is a shallow copy.
value
public static <S> Versioned<S> value(S s)
value
public static <S> Versioned<S> value(S s,
IVersion v)
emptyVersioned
public static <S> Versioned<S> emptyVersioned()