org.safehaus.uuid
Class UUIDTimer

java.lang.Object
  extended by org.safehaus.uuid.UUIDTimer

public class UUIDTimer
extends java.lang.Object

UUIDTimer produces the time stamps required for time-based UUIDs. It works as outlined in the UUID specification, with following implementation:

Some additional assumptions about calculating the timestamp:

Note about synchronization: this class is assumed to always be called from a synchronized context (caller locks on either this object, or a similar timer lock), and so has no method synchronization.


Constructor Summary
UUIDTimer(java.util.Random rnd)
           
 
Method Summary
 void getTimestamp(byte[] uuidData)
           
 void setSynchronizer(TimestampSynchronizer sync)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UUIDTimer

public UUIDTimer(java.util.Random rnd)
Method Detail

getTimestamp

public void getTimestamp(byte[] uuidData)

setSynchronizer

public void setSynchronizer(TimestampSynchronizer sync)
                     throws java.io.IOException
Throws:
java.io.IOException