org.jgroups.protocols
Class TransportedVectorTime
java.lang.Object
org.jgroups.protocols.TransportedVectorTime
- Serializable
public class TransportedVectorTime
extends java.lang.Object
implements Serializable
Lighweight representation of the VectorTime clock suitable for network transport
- Vladimir Blagojevic vladimir@cs.yorku.ca
boolean | equals(Object other) -
Checks if this TransportedVectorTimeis equal to the specified TransportedVectorTime.
|
Message | getAssociatedMessage() - Returns a message associated with this vector timestamp.
|
int | getSenderIndex() - Returns sender index
|
int[] | getValues() - Returns vector values
|
boolean | lessThanOrEqual(TransportedVectorTime other) -
Checks if this TransportedVectorTime is less than or equal to the the specified TransportedVectorTime.
|
void | setAssociatedMessage(Message owner) - Sets a message associated with this vector timestamp
|
int | size() - Returns size of this vector timestamp i.e number of process group members
|
String | toString() - Returns String representation of this vector timestamp
|
TransportedVectorTime
public TransportedVectorTime()
TransportedVectorTime
public TransportedVectorTime(int senderIndex,
int[] values)
Constructs TransportedVectorTime with sender index and vector values
senderIndex
- index of the sender of the messagevalues
- vector values
equals
public boolean equals(Object other)
Checks if this TransportedVectorTimeis equal to the specified TransportedVectorTime.
The check is done as follows:
VT1==VT2 iff for every i:1..k VT1[i]==VT2[i]
other
- TransportedVectorTimebeing compared with this.
- true if the equation given above is true, false otherwise
getAssociatedMessage
public Message getAssociatedMessage()
Returns a message associated with this vector timestamp.
- Message associated with this vector timestamp
getSenderIndex
public int getSenderIndex()
Returns sender index
getValues
public int[] getValues()
Returns vector values
- an array of vector values
lessThanOrEqual
public boolean lessThanOrEqual(TransportedVectorTime other)
Checks if this TransportedVectorTime is less than or equal to the the specified TransportedVectorTime.
The check is done as follows:
VT1<=VT2 iff for every i:1..k VT1[i]<=VT2[i]
other
- TransportedVectorTimebeing compared with this.
- true if this TransportedVectorTimeis less than or equal from
other, false othwerwise
setAssociatedMessage
public void setAssociatedMessage(Message owner)
Sets a message associated with this vector timestamp
owner
- Message that is associated with this vector timestamp
size
public int size()
Returns size of this vector timestamp i.e number of process group members
toString
public String toString()
Returns String representation of this vector timestamp
- String representing this vetor timestamp
Copyright B) 1998-2005 Bela Ban. All Rights Reserved.