org.jgroups.protocols

## Class TransportedVectorTime

- java.lang.Object
- - org.jgroups.protocols.TransportedVectorTime

All Implemented Interfaces:
  java.io.Serializable

    public class TransportedVectorTime
    extends java.lang.Object
    implements java.io.Serializable

Lighweight representation of the VectorTime clock suitable for network transport

Version:
  $Revision: 1.8 $
Author:
  Vladimir Blagojevic vladimir@cs.yorku.ca
See Also:
  Serialized Form

### Constructor Summary

Constructors
Constructor and Description
`TransportedVectorTime()`
`TransportedVectorTime(int senderIndex, int[] values)` Constructs TransportedVectorTime with sender index and vector values

### Method Summary

Methods
`boolean` `equals(java.lang.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
`java.lang.String` `toString()` Returns String representation of this vector timestamp

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### TransportedVectorTime

    public TransportedVectorTime()

#### TransportedVectorTime

    public TransportedVectorTime(int senderIndex,
                         int[] values)

Constructs TransportedVectorTime with sender index and vector values

Parameters:
  `senderIndex` - index of the sender of the message
  `values` - vector values

### Method Detail

#### getSenderIndex

    public int getSenderIndex()

Returns sender index

Returns:
  sender index position

#### getValues

    public int[] getValues()

Returns vector values

Returns:
  an array of vector values

#### size

    public int size()

Returns size of this vector timestamp i.e number of process group members

Returns:
  vector timestamp size

#### setAssociatedMessage

    public void setAssociatedMessage(Message owner)

Sets a message associated with this vector timestamp

Parameters:
  `owner` - Message that is associated with this vector timestamp

#### getAssociatedMessage

    public Message getAssociatedMessage()

Returns a message associated with this vector timestamp.

Returns:
  Message associated with this vector timestamp

#### 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]

Parameters:
  `other` - TransportedVectorTimebeing compared with this.
Returns:
  true if this TransportedVectorTimeis less than or equal from other, false othwerwise

#### equals

    public boolean equals(java.lang.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]

Overrides:
  `equals` in class `java.lang.Object`
Parameters:
  `other` - TransportedVectorTimebeing compared with this.
Returns:
  true if the equation given above is true, false otherwise

#### toString

    public java.lang.String toString()

Returns String representation of this vector timestamp

Overrides:
  `toString` in class `java.lang.Object`
Returns:
  String representing this vetor timestamp