@Immutable @Deprecated public class DefaultDataVersion extends Object implements DataVersion
long
to
compare versions.
This class is immutable.
Also note that this is meant to control implicit, internal versioning. Do not attempt to instantiate or use instances
of this class explicitly, via the Option.setDataVersion(DataVersion)
API, as it WILL
break things.Modifier and Type | Field and Description |
---|---|
static DataVersion |
ZERO
Deprecated.
Version zero.
|
Constructor and Description |
---|
DefaultDataVersion()
Deprecated.
Constructs with version 0.
|
DefaultDataVersion(long version)
Deprecated.
Constructs with a version number.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object other)
Deprecated.
|
long |
getRawVersion()
Deprecated.
|
int |
hashCode()
Deprecated.
|
DataVersion |
increment()
Deprecated.
Returns a new DataVersion with a newer version number.
|
boolean |
newerThan(DataVersion other)
Deprecated.
Returns true if this is a newer version than
other . |
String |
toString()
Deprecated.
|
public static final DataVersion ZERO
public DefaultDataVersion()
public DefaultDataVersion(long version)
public DataVersion increment()
public boolean newerThan(DataVersion other)
DataVersion
other
. There is no guarantee that the DataVersion passed
in is of the same implementation as the current instance. The implementation will have to check for this (if necessary)
and (if necessary) throw a DataVersioningException
.newerThan
in interface DataVersion
public long getRawVersion()
Copyright © 2012 JBoss, a division of Red Hat. All Rights Reserved.