|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jalios.jstore.StampTable
public class StampTable
This class contains a set of stamp (one per urid). It is typically used to maintain progress tables. A progress table represents the advancement of a replica according the other replica of the group.
Field Summary | |
---|---|
static String |
REVISION
|
Constructor Summary | |
---|---|
StampTable()
|
|
StampTable(StampTable other)
|
Method Summary | |
---|---|
Object |
clone()
|
int |
compareLogEntry(LogEntry logEntry)
Compares the given stamp of the logEntry with the ones in the table. |
int |
compareStamp(Stamp stamp)
Compares the given stamp with the ones in the table. |
boolean |
equals(Object obj)
|
Stamp |
getBehindStamp(StampTable st)
Gets the most behind stamp of this StampTable according the given StampTable. |
Stamp |
getBehindStamp(StampTable st,
boolean useRealStamp)
Gets the most behind stamp of this StampTable according the given StampTable. |
Map<String,Stamp> |
getMap()
|
Stamp |
getMaxStamp()
Returns the highest stamp contains in this StampTable |
Stamp |
getMinStamp()
Returns the smallest stamp contains in this StampTable |
StampTable |
getMinTable(StampTable st)
Build a new StampTable for this one and the given one. |
Stamp |
getRealStamp(String urid)
Returns the stamps to which this StampTable maps the specified urid. |
Stamp |
getStamp(String urid)
Returns the stamps to which this StampTable maps the specified urid. |
boolean |
isGreaterThan(Stamp stamp,
boolean isStrict)
Check if this StampTable contains at least one stamp greater than the given stamp. |
boolean |
isGreaterThan(StampTable other,
boolean isStrict)
Checks if this StampTable is greater than the given one. |
boolean |
isGreaterThan(StampTable other,
boolean isStrict,
String uridToIgnore)
Checks if this StampTable is greater than the given one. |
boolean |
isGreaterThanStamp(Stamp other,
boolean isStrict)
Checks if this StampTable contains a stamp greater than the given one. |
boolean |
isLesserThan(Stamp stamp,
boolean isStrict)
Check if all the stamps of this StampTable are lesser than the given stamp. |
boolean |
isLesserThan(StampTable other,
boolean isStrict)
Checks if this StampTable is lesser than the given one. |
boolean |
isLesserThan(StampTable other,
boolean isStrict,
String uridToIgnore)
Checks if this StampTable is lesser than the given one. |
boolean |
isLesserThanStamp(Stamp other,
boolean isStrict)
Checks if this StampTable contains a stamp lesser than the given one. |
boolean |
isPartiallyGreaterThan(StampTable other)
Checks if this StampTable is partially greater than the given one. |
void |
putStamp(Stamp stamp)
Puts this stamp in the StampTable |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String REVISION
Constructor Detail |
---|
public StampTable()
public StampTable(StampTable other)
Method Detail |
---|
public Map<String,Stamp> getMap()
public Object clone()
clone
in class Object
public void putStamp(Stamp stamp)
stamp
- the stamp to be addedpublic Stamp getStamp(String urid)
urid
- urid whose associated stamp is to be returned.
public Stamp getRealStamp(String urid)
urid
- urid whose associated stamp is to be returned.public int compareStamp(Stamp stamp)
stamp
- the stamp to be compared
public int compareLogEntry(LogEntry logEntry)
logEntry
- the logEntry to be compared
compareStamp(Stamp)
public boolean equals(Object obj)
equals
in class Object
public boolean isGreaterThan(StampTable other, boolean isStrict)
other
- the other table to be comparedisStrict
- true if strict comparison
isGreaterThan(StampTable,boolean,String)
public boolean isGreaterThan(StampTable other, boolean isStrict, String uridToIgnore)
other
- the other table to be comparedisStrict
- true if strict comparisonuridToIgnore
- this urid will be ignored for the comparison (can be null)
public boolean isLesserThan(StampTable other, boolean isStrict)
other
- the other table to be comparedisStrict
- true if strict comparison
isGreaterThan(StampTable,boolean,String)
public boolean isLesserThan(StampTable other, boolean isStrict, String uridToIgnore)
other
- the other table to be comparedisStrict
- true if strict comparisonuridToIgnore
- this urid will be ignored for the comparison (can be null)
isGreaterThan(StampTable,boolean,String)
public boolean isGreaterThan(Stamp stamp, boolean isStrict)
stamp
- the stamp to be comparedisStrict
- true if strict comparison
isLesserThan(Stamp,boolean)
public boolean isLesserThan(Stamp stamp, boolean isStrict)
stamp
- the stamp to be comparedisStrict
- true if strict comparison
isGreaterThan(Stamp,boolean)
public boolean isPartiallyGreaterThan(StampTable other)
other
- the other table to be compared
public boolean isGreaterThanStamp(Stamp other, boolean isStrict)
other
- the stamp to be comparedisStrict
- true if strict comparison
isLesserThanStamp(Stamp,boolean)
public boolean isLesserThanStamp(Stamp other, boolean isStrict)
other
- the stamp to be comparedisStrict
- true if strict comparison
isGreaterThanStamp(Stamp,boolean)
public Stamp getMinStamp()
Stamp.min(Stamp,Stamp)
public Stamp getMaxStamp()
Stamp.max(Stamp,Stamp)
public Stamp getBehindStamp(StampTable st)
st
- the StampTable to compare with
public Stamp getBehindStamp(StampTable st, boolean useRealStamp)
st
- the StampTable to compare withuseRealStamp
- if true, considere missing stamp as (urid, 0)
public StampTable getMinTable(StampTable st)
st
- the StampTable to used
getRealStamp(String)
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |