|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.cache.optimistic.DefaultDataVersion
public class DefaultDataVersion
The default implementation of a DataVersion, uses a long to
compare versions.
This class is immutable.
Option.setDataVersion(DataVersion) API, as it WILL
break things.
| Field Summary | |
|---|---|
static DataVersion |
ZERO
Version zero. |
| Constructor Summary | |
|---|---|
DefaultDataVersion()
Constructs with version 0. |
|
DefaultDataVersion(long version)
Constructs with a version number. |
|
| Method Summary | |
|---|---|
boolean |
equals(Object other)
|
long |
getRawVersion()
|
int |
hashCode()
|
DataVersion |
increment()
Returns a new DataVersion with a newer version number. |
boolean |
newerThan(DataVersion other)
Returns true if this is a newer version than other. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final DataVersion ZERO
| Constructor Detail |
|---|
public DefaultDataVersion()
public DefaultDataVersion(long version)
| Method Detail |
|---|
public DataVersion increment()
public boolean newerThan(DataVersion other)
DataVersionother. 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 DataVersionpublic String toString()
toString in class Objectpublic boolean equals(Object other)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic long getRawVersion()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||