|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jalios.jstore.Stamp
public class Stamp
This class represents a stamp. A stamp contains two parts:
- a replica identifier (URID)
- a time value
| Field Summary | |
|---|---|
static String |
REVISION
|
static String |
STAMP_SEPARATOR
|
| Constructor Summary | |
|---|---|
Stamp(String str)
Create a new stamp from a string having the following format: urid[STAMP_SEPARATOR]time |
|
Stamp(String urid,
long time)
Create a new stamp from an URID and a logical time |
|
| Method Summary | |
|---|---|
int |
compareTo(Stamp stamp)
Compares this stamp with the specified stamp for order. |
boolean |
equals(Object obj)
|
long |
getTime()
Get the value of time. |
String |
getUrid()
Get the value of urid. |
int |
hashCode()
|
static Stamp |
max(Stamp s1,
Stamp s2)
Return the greater of two stamps |
static Stamp |
min(Stamp s1,
Stamp s2)
Return the smaller of two stamps |
void |
setTime(long time)
Set the value of time. |
void |
setUrid(String urid)
Set the value of urid. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String REVISION
public static final String STAMP_SEPARATOR
| Constructor Detail |
|---|
public Stamp(String urid,
long time)
public Stamp(String str)
| Method Detail |
|---|
public String getUrid()
public void setUrid(String urid)
urid - Value to assign to urid.public long getTime()
public void setTime(long time)
time - Value to assign to time.public int compareTo(Stamp stamp)
compareTo in interface Comparable<Stamp>stamp - the Stamp to be compared.
public boolean equals(Object obj)
equals in class Objectpublic String toString()
toString in class Object
public static Stamp min(Stamp s1,
Stamp s2)
s1 - a stamps2 - a stamp
public static Stamp max(Stamp s1,
Stamp s2)
s1 - a stamps2 - a stamp
public int hashCode()
hashCode in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||