IzUUIDImpl
The goods are here: www.ietf.org/rfc/rfc4122.txt.
Attributes
- Graph
-
- Supertypes
-
trait IzUUIDPlatformSpecifictrait IzUUIDtrait IzPlatformEffectfulUtiltrait IzPlatformUtilclass Objecttrait Matchableclass AnyShow all
- Known subtypes
-
object IzUUID
Members list
Value members
Concrete methods
decomposes a uuid into raw bytes.
decomposes a uuid into raw bytes.
Attributes
Creates a type 1 UUID (time-based UUID).
Creates a type 1 UUID (time-based UUID).
Attributes
- Returns
-
a UUID instance
Returns a 16 byte representation of a type 1 UUID (a time-based UUID), based on the current system time.
Returns a 16 byte representation of a type 1 UUID (a time-based UUID), based on the current system time.
Attributes
- Returns
-
a type 1 UUID represented as a byte[]
Returns a milliseconds-since-epoch value for a type-1 UUID.
Returns a milliseconds-since-epoch value for a type-1 UUID.
Value parameters
- uuid
-
a type-1 (time-based) UUID
Attributes
- Returns
-
the number of milliseconds since the unix epoch
- Throws
-
IllegalArgumentException
if the UUID is not version 1
Similar to [[getTimeUUIDFromMicros]], but randomize (using SecureRandom) the clock and sequence.
Similar to [[getTimeUUIDFromMicros]], but randomize (using SecureRandom) the clock and sequence.
If you can guarantee that the whenInMicros argument is unique (for this JVM instance) for every call, then you should prefer [[getTimeUUIDFromMicros]] which is faster. If you can't guarantee this however, this method will ensure the returned UUID are still unique (accross calls) through randomization.
Value parameters
- whenInMicros
-
a unix time in microseconds.
Attributes
- Returns
-
a new UUID { @code id} such that { @code microsTimestamp(id) == whenInMicros}. The UUID returned by different calls will be unique even if { @code whenInMicros} is not.
Creates a type 1 UUID (time-based UUID) with the timestamp of @param when, in milliseconds.
Creates a type 1 UUID (time-based UUID) with the timestamp of @param when, in milliseconds.
Attributes
- Returns
-
a UUID instance
Converts a milliseconds-since-epoch timestamp into the 16 byte representation of a type 1 UUID (a time-based UUID).
Converts a milliseconds-since-epoch timestamp into the 16 byte representation of a type 1 UUID (a time-based UUID).
Deprecated: This method goes again the principle of a time UUID and should not be used. For queries based on timestamp, minTimeUUID() and maxTimeUUID() can be used but this method has questionable usefulness. This is only kept because CQL2 uses it (see TimeUUID.fromStringCQL2) and we don't want to break compatibility.
Warning: This method is not guaranteed to return unique UUIDs; Multiple invocations using identical timestamps will result in identical UUIDs.
Attributes
- Returns
-
a type 1 UUID represented as a byte[]
Converts a 100-nanoseconds precision timestamp into the 16 byte representation of a type 1 UUID (a time-based UUID).
Converts a 100-nanoseconds precision timestamp into the 16 byte representation of a type 1 UUID (a time-based UUID).
To specify a 100-nanoseconds precision timestamp, one should provide a milliseconds timestamp and a number 0 Warning: This method is not guaranteed to return unique UUIDs; Multiple invocations using identical timestamps will result in identical UUIDs.
Attributes
- Returns
-
a type 1 UUID represented as a byte[]
Returns a version 1 UUID using the provided timestamp and the local clock and sequence.
Returns a version 1 UUID using the provided timestamp and the local clock and sequence.
Note that this method is generally only safe to use if you can guarantee that the provided parameter is unique across calls (otherwise the returned UUID won't be unique accross calls).
Value parameters
- whenInMicros
-
a unix time in microseconds.
Attributes
- Returns
-
a new UUID { @code id} such that { @code microsTimestamp(id) == whenInMicros}. Please not that multiple calls to this method with the same value of { @code whenInMicros} will return the same UUID.
creates a type 1 uuid from raw bytes.
creates a type 1 uuid from raw bytes.
Attributes
Returns the biggest possible type 1 UUID having the provided timestamp.
Returns the biggest possible type 1 UUID having the provided timestamp.
Warning: this method should only be used for querying as this doesn't at all guarantee the uniqueness of the resulting UUID.
Attributes
Attributes
- Returns
-
microseconds since Unix epoch
Returns the smaller possible type 1 UUID having the provided timestamp.
Returns the smaller possible type 1 UUID having the provided timestamp.
Warning: this method should only be used for querying as this doesn't at all guarantee the uniqueness of the resulting UUID.
Attributes
Attributes
- Returns
-
milliseconds since Unix epoch
Inherited methods
Attributes
- Inherited from:
- IzUUIDPlatformSpecific
Generate the 48-bit node ID for Time UUIDs.
Generate the 48-bit node ID for Time UUIDs.
On JVM, we hash all local network addresses to create a node ID that is unique to this host. Per RFC 4122, since we're not using a real MAC address, we set the multicast bit (bit 0 of the first octet) to indicate this is a randomly/hash-generated node ID.
Attributes
- Inherited from:
- IzUUIDPlatformSpecific