org.jgroups.protocols
public class VectorTime extends Object
Version: $Revision: 1.5 $
Constructor Summary | |
---|---|
VectorTime(Address owner)
Constructs VectorTime given an adress of a owning group member |
Method Summary | |
---|---|
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 |
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(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 |
String | toString()
return String representation of the VectorTime |
Parameters: owner Address of the owner group member
Returns: Addresses of other group members
Returns: index of the owner of this VectorTime or -1 if not found
Returns: lightweight representation of this VectorTime in the form of TransportedVectorTime object
Returns: values of the Vector clock as an array
Returns: values of the Vector clock
Parameters: member group member represented by this Address
Returns: index of the group member or -1 if not found
Parameters: other TransportedVectorTime representation of vector clock
Returns: true if the given TransportedVectorTime is the next causal to this VectorTime
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])
Parameters: other TransportedVectorTime that is max-ed with this VectorTime
Parameters: newMembers members of this group
Returns: String representation of this VectorTime object