core.time
Class VSLamportTime

java.lang.Object
  extended by core.time.VSLamportTime
All Implemented Interfaces:
VSTime

public class VSLamportTime
extends java.lang.Object
implements VSTime

The class VSLamportTime, defines how the lamport timestamps are represented.

Author:
Paul C. Buetow

Constructor Summary
VSLamportTime(long globalTime, long lamportTime)
          A simple constructor.
 
Method Summary
 long getGlobalTime()
          Gets the global time.
 long getLamportTime()
          Gets the lamport time.
 java.lang.String toString()
          Returns a string representation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

VSLamportTime

public VSLamportTime(long globalTime,
                     long lamportTime)
A simple constructor.

Parameters:
globalTime - The global time.
lamportTime - The local lamport time.
Method Detail

getGlobalTime

public long getGlobalTime()
Description copied from interface: VSTime
Gets the global time.

Specified by:
getGlobalTime in interface VSTime
Returns:
The global time

getLamportTime

public long getLamportTime()
Gets the lamport time.

Returns:
The process' local lamport time

toString

public java.lang.String toString()
Description copied from interface: VSTime
Returns a string representation.

Specified by:
toString in interface VSTime
Overrides:
toString in class java.lang.Object
Returns:
The representation of the implementing object as a string