Liking cljdoc? Tell your friends :D

clj-uuid


+namespace-dns+clj


+namespace-oid+clj


+namespace-url+clj


+namespace-x500+clj


+null+clj


monotonic-timeclj

(monotonic-time)

Return a monotonic timestamp (guaranteed always increasing) based on the number of 100-nanosecond intervals elapsed since the adoption of the Gregorian calendar in the West, 12:00am Friday October 15, 1582 UTC.

Return a monotonic timestamp (guaranteed always increasing) based on
the number of 100-nanosecond intervals elapsed since the adoption of
the Gregorian calendar in the West, 12:00am Friday October 15, 1582 UTC.
raw docstring

nullclj

(null)

Generates the v0 (null) UUID, 00000000-0000-0000-0000-000000000000.

Generates the v0 (null) UUID, 00000000-0000-0000-0000-000000000000.
raw docstring

squuidclj

(squuid)

Generate a SQUUID (sequential, random) unique identifier. SQUUID's are a nonstandard variation on v4 (random) UUIDs that have the desirable property that they increase sequentially over time as well as encode retrievably the posix time at which they were generated. Splits and reassembles a v4 UUID to merge current POSIX time (seconds since 12:00am January 1, 1970 UTC) with the most significant 32 bits of the UUID.

Generate a SQUUID (sequential, random) unique identifier.  SQUUID's
are a nonstandard variation on v4 (random) UUIDs that have the
desirable property that they increase sequentially over time as well
as encode retrievably the posix time at which they were generated.
Splits and reassembles a v4 UUID to merge current POSIX
time (seconds since 12:00am January 1, 1970 UTC) with the most
significant 32 bits of the UUID.
raw docstring

uuid-string?clj

(uuid-string? str)

uuid-urn-string?clj

(uuid-urn-string? str)

uuid-vec?clj

(uuid-vec? v)

UUIDablecljprotocol

A UUIDable object directly represents a UUID. Examples of things which might be conceptually 'uuidable' include string representation of a UUID in canonical hex format, or an appropriate URN URI.

A UUIDable object directly represents a UUID.  Examples of things which
might be conceptually 'uuidable' include string representation of a
UUID in canonical hex format, or an appropriate URN URI.

as-uuidclj

(as-uuid x)

Coerce the value 'x' to a UUID.

Coerce the value 'x' to a UUID.

uuidable?clj

(uuidable? x)

Return 'true' if 'x' can be coerced to UUID.

Return 'true' if 'x' can be coerced to UUID.
raw docstring

UUIDNameBytescljprotocol

A mechanism intended for user-level extension that defines the decoding rules for the local-part representation of arbitrary Clojure / Java Objects when used for computing namespaced identifiers.

A mechanism intended for user-level extension that defines the
decoding rules for the local-part representation of arbitrary
Clojure / Java Objects when used for computing namespaced
identifiers.

as-byte-arrayclj

(as-byte-array x)

Extract a byte serialization that represents the 'name' of x, typically unique within a given namespace.

Extract a byte serialization that represents the 'name' of x, 
typically unique within a given namespace.
raw docstring

UUIDRfc4122cljprotocol

A protocol that abstracts an unique identifier as described by IETF RFC4122 http://www.ietf.org/rfc/rfc4122.txt. A UUID represents a 128-bit value, however there are variant encoding layouts used to assign and interpret information encoded in those bits. This is a protocol for variant 2 (Leach-Salz) UUID's.

A protocol that abstracts an unique identifier as described by
IETF RFC4122 <http://www.ietf.org/rfc/rfc4122.txt>. A UUID
represents a 128-bit value, however there are variant encoding
layouts used to assign and interpret information encoded in
those bits.  This is a protocol for  _variant 2_ (*Leach-Salz*) 
UUID's.

get-instantclj

(get-instant uuid)

For time-based (v1) UUID's, return a java.util.Date object that represents the system time at which this UUID was generated. NOTE: the returned value may not necessarily be temporally unique. For non-time-based (v3, v4, v5, squuid) UUID's, always returns nil.

For time-based (v1) UUID's, return a java.util.Date object that represents
the system time at which this UUID was generated. NOTE: the returned
value may not necessarily be temporally unique. For non-time-based 
(v3, v4, v5, squuid) UUID's, always returns `nil`.

get-clk-lowclj

(get-clk-low uuid)

Return the 8 bit unsigned value that represents the least significant byte of the clk-seq associated with this UUID.

Return the 8 bit unsigned value that represents the least significant
byte of the `clk-seq` associated with this UUID.

hash-codeclj

(hash-code uuid)

Return a suitable 64-bit hash value for uuid. Extend with specialized hash computation.

Return a suitable 64-bit hash value for `uuid`.  Extend with 
specialized hash computation.

to-hex-stringclj

(to-hex-string uuid)

Return a String object that represents uuid as the 32 hexadecimal characters directly encodong the UUID's 128 bit value:

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Return a String object that represents `uuid` as the 32 hexadecimal 
characters directly encodong the UUID's 128 bit value: 

    xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

uuid=clj

(uuid= x y)

Directly compare two UUID's for = relation based on the equality semantics defined by [RFC4122:3 RULES FOR LEXICAL EQUIVALENCE].

Directly compare two UUID's for = relation based on the equality
semantics defined by [RFC4122:3 RULES FOR LEXICAL EQUIVALENCE].

to-byte-arrayclj

(to-byte-array uuid)

Return an array of 16 bytes that represents uuid as a decomposed octet serialization encoded in most-significant-byte first order.

Return an array of 16 bytes that represents `uuid` as a decomposed 
octet serialization encoded in most-significant-byte first order.

get-word-lowclj

(get-word-low uuid)

Return the least significant 64 bits of UUID's 128 bit value.

Return the least significant 64 bits of UUID's 128 bit value.

get-clk-seqclj

(get-clk-seq uuid)

Return the clock-sequence number associated with this UUID. For time-based (v1) UUID's the 'clock-sequence' value is a somewhat counter-intuitively named seed-value that is used to reduce the potential that duplicate UUID's might be generated under unusual situations, such as if the system hardware clock is set backward in time or if, despite all efforts otherwise, a duplicate node-id happens to be generated. This value is initialized to a random 16-bit number once per lifetime of the system. For non-time-based (v3, v4, v5, squuid) UUID's, always returns nil.

Return the clock-sequence number associated with this UUID. For time-based
(v1) UUID's the 'clock-sequence' value is a somewhat counter-intuitively 
named seed-value that is used to reduce the potential that duplicate UUID's 
might be generated under unusual situations, such as if the system hardware
clock is set backward in time or if, despite all efforts otherwise, a 
duplicate node-id happens to be generated. This value is initialized to 
a random 16-bit number once per lifetime of the system.  For non-time-based
(v3, v4, v5, squuid) UUID's, always returns `nil`.

get-node-idclj

(get-node-id uuid)

Return the 48 bit unsigned value that represents the spatially unique node identifier associated with this UUID.

Return the 48 bit unsigned value that represents the spatially unique 
node identifier associated with this UUID.

uuid>clj

(uuid> x y)

Directly compare two UUID's for > relation based on the ordinality semantics defined by [RFC4122:3 RULES FOR LEXICAL EQUIVALENCE].

Directly compare two UUID's for > relation based on the ordinality
semantics defined by [RFC4122:3 RULES FOR LEXICAL EQUIVALENCE].

null?clj

(null? uuid)

Return true only if uuid has all 128 bits set ot zero and is therefore equal to the null UUID, 00000000-0000-0000-0000-000000000000.

Return `true` only if `uuid` has all 128 bits set ot zero and is 
therefore equal to the null UUID, 00000000-0000-0000-0000-000000000000.

uuid<clj

(uuid< x y)

Directly compare two UUID's for < relation based on the ordinality semantics defined by [RFC4122:3 RULES FOR LEXICAL EQUIVALENCE].

Directly compare two UUID's for < relation based on the ordinality
semantics defined by [RFC4122:3 RULES FOR LEXICAL EQUIVALENCE].

get-word-highclj

(get-word-high uuid)

Return the most significant 64 bits of UUID's 128 bit value.

Return the most significant 64 bits of UUID's 128 bit value.

to-stringclj

(to-string uuid)

Return a String object that represents uuid in the canonical 36 character hex-string format:

xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Return a String object that represents `uuid` in the canonical 
36 character hex-string format: 

    xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

get-clk-highclj

(get-clk-high uuid)

Return the 8 bit unsigned value that represents the most significant byte of the clk-seq multiplexed with the variant of this UUID.

Return the 8 bit unsigned value that represents the most significant
byte of the `clk-seq` multiplexed with the `variant` of this UUID.

get-timestampclj

(get-timestamp uuid)

Return the 60 bit unsigned value that represents a temporally unique timestamp associated with this UUID. For time-based (v1) UUID's the result encodes the number of 100 nanosecond intervals since the adoption of the Gregorian calendar: 12:00am Friday October 15, 1582 UTC. For non-time-based (v3, v4, v5, squuid) UUID's, always returns nil.

Return the 60 bit unsigned value that represents a temporally unique
timestamp associated with this UUID.  For time-based (v1) UUID's the
result encodes the number of 100 nanosecond intervals since the
adoption of the Gregorian calendar: 12:00am Friday October 15, 1582 UTC.
For non-time-based (v3, v4, v5, squuid) UUID's, always returns `nil`.

get-time-lowclj

(get-time-low uuid)

Return the 32 bit unsigned value that represents the time-low field of the timestamp associated with this UUID.

Return the 32 bit unsigned value that represents the `time-low` field
of the `timestamp` associated with this UUID.

to-urn-stringclj

(to-urn-string uuid)

Return a String object that represents uuid as a the string serialization of the URN URI based on the canonical 36 character hex-string representation:

urn:uuid:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Return a String object that represents `uuid` as a the string 
serialization of the URN URI based on the canonical 36 character 
hex-string representation: 

    urn:uuid:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

get-versionclj

(get-version uuid)

Return the version number associated with this UUID. The version field contains a value which describes the nature of the UUID. There are five versions of Leach-Salz UUID, plus the null UUID:

0x0 Null 0x1 Time based 0x2 DCE security with POSIX UID 0x3 Namespaced (MD5 Digest) 0x4 Cryptographic random 0x5 Namespaced (SHA1 Digest)

In the canonical representation, xxxxxxxx-xxxx-Mxxx-xxxx-xxxxxxxxxxxx, the four bits of M indicate the UUID version (i.e., the hexadecimal M will be either 1, 2, 3, 4, or 5).

Return the version number associated with this UUID.  The version
field contains a value which describes the nature of the UUID.  There
are five versions of Leach-Salz UUID, plus the null UUID:

0x0   Null
0x1   Time based
0x2   DCE security with POSIX UID
0x3   Namespaced (MD5 Digest)
0x4   Cryptographic random
0x5   Namespaced (SHA1 Digest)

In the canonical representation, xxxxxxxx-xxxx-Mxxx-xxxx-xxxxxxxxxxxx, 
the four bits of M indicate the UUID version (i.e., the hexadecimal M 
will be either 1, 2, 3, 4, or 5).

get-time-highclj

(get-time-high uuid)

Return the 16 bit unsigned value that represents the time-high field of the timestamp multiplexed with the version of this UUID.

Return the 16 bit unsigned value that represents the `time-high` field
of the `timestamp` multiplexed with the `version` of this UUID.

get-time-midclj

(get-time-mid uuid)

Return the 16 bit unsigned value that represents the time-mid field of the timestamp assocaited with this UUID.

Return the 16 bit unsigned value that represents the `time-mid` field
of the `timestamp` assocaited with this UUID.

get-variantclj

(get-variant uuid)

Return the variant number associated with this UUID. The variant field contains a value which identifies the layout of the UUID. The bit-layout implemented by this protocol supports UUID's with a variant value of 0x2, which indicates Leach-Salz layout. Defined UUID variant values are:

0x0 Null 0x2 Leach-Salz 0x6 Microsoft 0x7 Reserved for future assignment

In the canonical representation, xxxxxxxx-xxxx-xxxx-Nxxx-xxxxxxxxxxxx, the most significant bits of N indicate the variant (depending on the variant one, two, or three bits are used). The variant covered by RFC4122 is indicated by the two most significant bits of N being 1 0 (i.e., the hexadecimal N will always be 8, 9, A, or B).

Return the variant number associated with this UUID.  The variant field 
contains a value which identifies the layout of the UUID.  The bit-layout 
implemented by this protocol supports UUID's with a variant value of 0x2,
which indicates Leach-Salz layout.  Defined UUID variant values are:

0x0   Null 
0x2   Leach-Salz
0x6   Microsoft 
0x7   Reserved for future assignment

In the canonical representation, xxxxxxxx-xxxx-xxxx-Nxxx-xxxxxxxxxxxx,
the most significant bits of N indicate the variant (depending on the
variant one, two, or three bits are used). The variant covered by RFC4122
is indicated by the two most significant bits of N being 1 0 (i.e., the 
hexadecimal N will always be 8, 9, A, or B).

uuid?clj

(uuid? x)

Return true if x implements an RFC4122 unique identifier.

Return `true` if `x` implements an RFC4122 unique identifier.

to-uriclj

(to-uri uuid)

Return the unique URN URI associated with this UUID.

Return the unique URN URI associated with this UUID.
raw docstring

v0clj

(v0)

Generates the v0 (null) UUID, 00000000-0000-0000-0000-000000000000.

Generates the v0 (null) UUID, 00000000-0000-0000-0000-000000000000.
raw docstring

v1clj

(v1)

Generate a v1 (time-based) unique identifier, guaranteed to be unique and thread-safe regardless of clock precision or degree of concurrency. Creation of v1 UUID's does not require any call to a cryptographic generator and can be accomplished much more efficiently than v3, v4, v5, or squuid's. A v1 UUID reveals both the identity of the computer that generated the UUID and the time at which it did so. Its uniqueness across computers is guaranteed as long as MAC addresses are not duplicated.

Generate a v1 (time-based) unique identifier, guaranteed to be unique
and thread-safe regardless of clock precision or degree of concurrency.
Creation of v1 UUID's does not require any call to a cryptographic 
generator and can be accomplished much more efficiently than v3, v4, v5,
or squuid's.  A v1 UUID reveals both the identity of the computer that 
generated the UUID and the time at which it did so.  Its uniqueness across 
computers is guaranteed as long as MAC addresses are not duplicated.
raw docstring

v3clj

(v3 context local-part)

Generate a v3 (name based, MD5 hash) UUID. 'context' must be UUIDable. v3 identifiers are intended for generating UUID's from names that are drawn from, and unique within, some namespace. The concept of name and namespace should be broadly construed, and not limited to textual names. The requiremens for a v3 UUID are as follows:

  • v3 UUID's generated at different times from the same name in the same namespace MUST be equal.

  • v3 UUID's generated from two different names in the same namespace SHOULD be distinct with a high degree of certainty.

  • v3 UUID's generated from the same name in two different namespaces SHOULD be distinct with a high degree of certainty.

  • If two v3 UUID's are equal, then there is a high degree of certainty that they were generated from the same name in the same namespace.

Generate a v3 (name based, MD5 hash) UUID. 'context' must be UUIDable.
v3 identifiers are intended for generating UUID's from names that are 
drawn from, and unique within, some namespace.  The concept of name and 
namespace should be broadly construed, and not limited to textual names.
The requiremens for a v3 UUID are as follows:

* v3 UUID's generated at different times from the same name in the same
  namespace MUST be equal.

* v3 UUID's generated from two different names in the same namespace
  SHOULD be distinct with a high degree of certainty.

* v3 UUID's generated from the same name in two different namespaces
  SHOULD be distinct with a high degree of certainty.

* If two v3 UUID's are equal, then there is a high degree of certainty
  that they were generated from the same name in the same namespace.
raw docstring

v4clj

(v4)
(v4 msb lsb)

Generate a v4 (random) UUID. Uses default JVM implementation. If two arguments, lsb and msb (both long) are provided, then construct a valid, properly formatted v4 UUID based on those values. So, for example the following UUID, created from all zero bits, is indeed distinct from the null UUID:

(v4)
 => #uuid "dcf0035f-ea29-4d1c-b52e-4ea499c6323e"

(v4 0 0)
 => #uuid "00000000-0000-4000-8000-000000000000"

(null)
 => #uuid "00000000-0000-0000-0000-000000000000"
Generate a v4 (random) UUID.  Uses default JVM implementation.  If two
arguments, lsb and msb (both long) are provided, then construct a valid,
properly formatted v4 UUID based on those values.  So, for example the
following UUID, created from all zero bits, is indeed distinct from the
null UUID:

    (v4)
     => #uuid "dcf0035f-ea29-4d1c-b52e-4ea499c6323e"

    (v4 0 0)
     => #uuid "00000000-0000-4000-8000-000000000000"

    (null)
     => #uuid "00000000-0000-0000-0000-000000000000"
raw docstring

v5clj

(v5 context local-part)

Generate a v5 (name based, SHA1 hash) UUID. 'context' must be UUIDable. v5 identifiers are intended for generating UUID's from names that are drawn from, and unique within, some namespace. The concept of name and namespace should be broadly construed, and not limited to textual names. The requiremens for a v5 UUID are as follows:

  • v5 UUID's generated at different times from the same name in the same namespace MUST be equal.

  • v5 UUID's generated from two different names in the same namespace SHOULD be distinct with a high degree of certainty.

  • v5 UUID's generated from the same name in two different namespaces SHOULD be distinct with a high degree of certainty.

  • If two v5 UUID's are equal, then there is a high degree of certainty that they were generated from the same name in the same namespace.

Generate a v5 (name based, SHA1 hash) UUID. 'context' must be UUIDable.
v5 identifiers are intended for generating UUID's from names that are 
drawn from, and unique within, some namespace.  The concept of name and 
namespace should be broadly construed, and not limited to textual names.
The requiremens for a v5 UUID are as follows:

* v5 UUID's generated at different times from the same name in the same
  namespace MUST be equal.

* v5 UUID's generated from two different names in the same namespace
  SHOULD be distinct with a high degree of certainty.

* v5 UUID's generated from the same name in two different namespaces
  SHOULD be distinct with a high degree of certainty.

* If two v5 UUID's are equal, then there is a high degree of certainty
  that they were generated from the same name in the same namespace.
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close