org.hypergraphdb.peer.log
Class Timestamp

java.lang.Object
  extended by org.hypergraphdb.peer.log.Timestamp
All Implemented Interfaces:
java.lang.Comparable<Timestamp>

public class Timestamp
extends java.lang.Object
implements java.lang.Comparable<Timestamp>

Author:
ciprian.costa Ensures ordering on events originated for the current peer. TODO: this seems like implementation of a logical clock, should be renamed and it's behavior/usage documented...

Constructor Summary
Timestamp()
           
Timestamp(int counter)
           
 
Method Summary
 Timestamp clone()
           
 int compareTo(Timestamp o)
           
 int getCounter()
           
 Timestamp moveNext()
           
 void setCounter(int counter)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Timestamp

public Timestamp()

Timestamp

public Timestamp(int counter)
Method Detail

moveNext

public Timestamp moveNext()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getCounter

public int getCounter()

setCounter

public void setCounter(int counter)

clone

public Timestamp clone()
Overrides:
clone in class java.lang.Object

compareTo

public int compareTo(Timestamp o)
Specified by:
compareTo in interface java.lang.Comparable<Timestamp>