|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.cassandra.utils.UUIDGen
public class UUIDGen
The goods are here: www.ietf.org/rfc/rfc4122.txt.
Method Summary | |
---|---|
static byte[] |
decompose(java.util.UUID uuid)
decomposes a uuid into raw bytes. |
static long |
getAdjustedTimestamp(java.util.UUID uuid)
Returns a milliseconds-since-epoch value for a type-1 UUID. |
static byte[] |
getTimeUUIDBytes()
Returns a 16 byte representation of a type 1 UUID (a time-based UUID), based on the current system time. |
static byte[] |
getTimeUUIDBytes(long timeMillis)
Converts a milliseconds-since-epoch timestamp into the 16 byte representation of a type 1 UUID (a time-based UUID). |
static java.util.UUID |
getUUID(java.nio.ByteBuffer raw)
creates a type 1 uuid from raw bytes. |
static java.util.UUID |
makeType1UUIDFromHost(java.net.InetAddress addr)
Creates a type 1 UUID (time-based UUID) that substitutes a hash of an IP address in place of the MAC (unavailable to Java). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static java.util.UUID makeType1UUIDFromHost(java.net.InetAddress addr)
addr
- the host address to use
public static java.util.UUID getUUID(java.nio.ByteBuffer raw)
public static byte[] decompose(java.util.UUID uuid)
public static byte[] getTimeUUIDBytes()
public static byte[] getTimeUUIDBytes(long timeMillis)
Warning: This method is not guaranteed to return unique UUIDs; Multiple invocations using identical timestamps will result in identical UUIDs.
timeMillis
-
public static long getAdjustedTimestamp(java.util.UUID uuid)
uuid
- a type-1 (time-based) UUID
InvalidArgumentException
- if the UUID is not version 1
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |