|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jgroups.protocols.VectorTime
public class VectorTime
Vector timestamp used in CAUSAL order protocol stack
Constructor Summary | |
---|---|
VectorTime(Address owner)
Constructs VectorTime given an adress of a owning group member |
Method Summary | |
---|---|
java.util.Collection |
getMembers()
Returns Collection containing addresses of other group members from this Vector clock |
int |
getOwnerIndex()
Returns owner index in this VectorTime clock |
TransportedVectorTime |
getTransportedVectorTime()
Returns a minimal lightweight representation of this Vector Time suitable for network transport. |
int[] |
getValues()
Returns Vector clock values of this Vector clock |
java.util.Collection |
getVectorValues()
Returns Vector clock values of this Vector clock |
void |
increment()
Incerements owners current vector value by 1 |
int |
indexOf(Address member)
Returns index of the given member represented by it's Address |
boolean |
isCausallyNext(TransportedVectorTime other)
Determines if the vector clock represented by TransportedVectorTime is causally next to this VectorTime |
void |
max(TransportedVectorTime other)
Maxes this VectorTime with the specified TransportedVectorTime. |
void |
merge(java.util.Vector newMembers)
Merges this VectorTime with new members of the group VectorTime can possibly either grow or shrink |
void |
reset()
Resets all the values in this vector clock to 0 |
java.lang.String |
toString()
return String representation of the VectorTime |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public VectorTime(Address owner)
owner
- Address of the owner group memberMethod Detail |
---|
public java.util.Collection getMembers()
public java.util.Collection getVectorValues()
public int[] getValues()
public void increment()
public void reset()
public TransportedVectorTime getTransportedVectorTime()
public void max(TransportedVectorTime other)
Maxes this VectorTime with the specified TransportedVectorTime. Updates this VectorTime as follows:
for every k:1...n VT(pj)[k] == max(VT(mi)[k],VT(pj)[k])
other
- TransportedVectorTime that is max-ed with this VectorTimepublic boolean isCausallyNext(TransportedVectorTime other)
other
- TransportedVectorTime representation of vector clock
public int getOwnerIndex()
public int indexOf(Address member)
member
- group member represented by this Address
public void merge(java.util.Vector newMembers)
newMembers
- members of this grouppublic java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |