public class UUIDGen
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
UUID_LEN |
Constructor and Description |
---|
UUIDGen() |
Modifier and Type | Method and Description |
---|---|
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 java.util.UUID |
getUUID(java.nio.ByteBuffer raw)
creates a type 1 uuid from raw bytes.
|
static java.nio.ByteBuffer |
toByteBuffer(java.util.UUID uuid) |
public static final int UUID_LEN
public static java.util.UUID getUUID(java.nio.ByteBuffer raw)
public static java.nio.ByteBuffer toByteBuffer(java.util.UUID uuid)
public static byte[] decompose(java.util.UUID uuid)
public static long getAdjustedTimestamp(java.util.UUID uuid)
uuid
- a type-1 (time-based) UUIDjava.lang.IllegalArgumentException
- if the UUID is not version 1Copyright © 2009- The Apache Software Foundation