|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.continuent.tungsten.common.patterns.order.HighWaterResource
public class HighWaterResource
A HighWater resource allows to represent and compare replicators applied
event IDs. It is especially used by session consistency/smart-scale to
compared master and slave progresses.
It is composed of a epoch and a event id. The string representation being
Constructor Summary
HighWaterResource()
HighWaterResource(long epoch,
java.lang.String eventId)
HighWaterResource(java.lang.String resourceAsString)
Method Summary
intcompareTo(HighWaterResource o)
Compare ourselves to what is passed in.
Two uninitialized HW will be equal
An uninitialized HW is always older than an initialized one Epochs
comparison is made first, then the offset.
booleanequals(java.lang.Object obj)
longgetHighWaterEpoch()
java.lang.StringgetHighWaterEventId()
static java.lang.StringgetSessionId(java.lang.String eventId)
booleanisInitialized()
Whether this HW is initialized
voidsetHighWaterEpoch(long highWaterEpoch)
voidsetHighWaterEventId(java.lang.String highWaterEventId)
java.lang.StringtoString()
voidupdate(long epoch,
java.lang.String eventId)
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Constructor Detail
HighWaterResource
public HighWaterResource()
HighWaterResource
public HighWaterResource(long epoch,
java.lang.String eventId)
HighWaterResource
public HighWaterResource(java.lang.String resourceAsString)
Method Detail
isInitialized
public boolean isInitialized()
compareTo
public int compareTo(HighWaterResource o)
Two uninitialized HW will be equal
An uninitialized HW is always older than an initialized one Epochs
comparison is made first, then the offset. Session Ids, if any are
ignored
compareTo in interface java.lang.Comparable<HighWaterResource>
Comparable.compareTo(java.lang.Object)
equals
public boolean equals(java.lang.Object obj)
equals in class java.lang.Object
update
public void update(long epoch,
java.lang.String eventId)
toString
public java.lang.String toString()
toString in class java.lang.Object
getSessionId
public static java.lang.String getSessionId(java.lang.String eventId)
getHighWaterEpoch
public long getHighWaterEpoch()
setHighWaterEpoch
public void setHighWaterEpoch(long highWaterEpoch)
getHighWaterEventId
public java.lang.String getHighWaterEventId()
setHighWaterEventId
public void setHighWaterEventId(java.lang.String highWaterEventId)
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD