com.gridsystems.innergrid.kernel
Class UUIDUtils

java.lang.Object
  extended by com.gridsystems.innergrid.kernel.UUIDUtils

public final class UUIDUtils
extends java.lang.Object

UUID Generation utility class.

Author:
Rodrigo Ruiz

Method Summary
static java.lang.String generateTimeBasedUUID()
          Generates a time based UUID.
static java.lang.String generateTimeBasedUUID(byte[] macAddress)
          Generates a time based UUID.
static byte[] getMacAddress()
          Gets the MAC address of this machine as a byte array.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

generateTimeBasedUUID

public static java.lang.String generateTimeBasedUUID()
Generates a time based UUID.

Returns:
An UUID

generateTimeBasedUUID

public static java.lang.String generateTimeBasedUUID(byte[] macAddress)
Generates a time based UUID.

Time-based generation generates UUID using spatial and temporal uniqueness. Spatial uniqueness is derived from ethernet address (MAC, 802.1); temporal from system clock.

Parameters:
macAddress - The MAC address
Returns:
An UUID for the specified ethernet address

getMacAddress

public static byte[] getMacAddress()
Gets the MAC address of this machine as a byte array.

Returns:
a 6-byte array containing the ethernet address of this machine


Copyright © 2007-2008 Grid Systems, S.A.. All Rights Reserved.