Packages

final case class UUID(timeAndCounter: Long, nodeIdAndRandom: Long) extends Ordered[UUID] with Product with Serializable

A custom UUID implementation (not to be confused with java.util.UUID or RFC4122 implementations) that allows natural sorting by timestamp based on the string or numeric representation.

The UUID consists of 16 bytes (128 bits) broken up into 2 longs:

timeAndCounter: {6-Byte Millis since epoch}{2-Byte Counter} nodeIdAndRandom: {2-Byte Node ID}{6-Byte Random Number}

The "pretty" hex encoded representation is: {6-byte millis since epoch}-{2-byte-counter}-{2-byte-optional-node-id}-{4-byte-random}

Example: 015247f01787-9740-85e0-3e9672a8dfa2

Source
UUID.scala
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. UUID
  2. Serializable
  3. Product
  4. Equals
  5. Ordered
  6. Comparable
  7. AnyRef
  8. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new UUID(timeAndCounter: Long, nodeIdAndRandom: Long)

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. def <(that: UUID): Boolean
    Definition Classes
    Ordered
  4. def <=(that: UUID): Boolean
    Definition Classes
    Ordered
  5. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  6. def >(that: UUID): Boolean
    Definition Classes
    Ordered
  7. def >=(that: UUID): Boolean
    Definition Classes
    Ordered
  8. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  9. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  10. def compare(that: UUID): Int
    Definition Classes
    UUID → Ordered
  11. def compareTo(that: UUID): Int
    Definition Classes
    Ordered → Comparable
  12. def counter: Int

    Between 0 and 65535 (both inclusive)

  13. def date: ImmutableDate

    The fm.common.ImmutableDate represented by the epochMilli

  14. def epochMilli: Long

    Between 0 and 281474976710655 (both inclusive) which is a 6-byte unsigned int

  15. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  16. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  17. def instant: Instant

    The java.time.Instant represented by the epochMilli

  18. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  19. def isRandomNodeId: Boolean

    Is this UUID using a random node id?

  20. def isSignedMaxValue: Boolean
  21. def isSignedMinValue: Boolean
  22. def isUnsignedMaxValue: Boolean
  23. def isZero: Boolean
  24. def javaDate: Date

    The java.util.Date represented by the epochMilli

  25. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  26. def nodeId: Int

    Between Short.MinValue (-32768) and Short.MaxValue (32767) (both inclusive)

  27. val nodeIdAndRandom: Long
  28. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  29. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  30. def productElementNames: Iterator[String]
    Definition Classes
    Product
  31. def random: Long

    Between 0 and 281474976710655 (both inclusive) which is a 6-byte unsigned int

  32. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  33. val timeAndCounter: Long
  34. def toBase16(): String
  35. def toBase58(): String
  36. def toBase64(): String
  37. def toBase64NoPadding(): String
  38. def toBase64URL(): String
  39. def toBase64URLNoPadding(): String
  40. def toBigInt: BigInt
  41. def toBigInteger: BigInteger
  42. def toByteArray(): Array[Byte]
  43. def toHex(): String
  44. def toImmutableByteArray(): ImmutableArray[Byte]
  45. def toJavaUUID: java.util.UUID
  46. def toPrettyString(sep: Char): String

    {6-byte millis since epoch}{sep}{2-byte-counter}{sep}{2-byte-optional-node-id}{sep}{4-byte-random}

  47. def toPrettyString(): String

    {6-byte millis since epoch}-{2-byte-counter}-{2-byte-optional-node-id}-{4-byte-random}

  48. def toStandardString(sep: Char): String

    {upper 4-bytes of 6-byte millis since epoch}{sep}{lower 2-bytes of 6-byte millis since epoch}{sep}{2-byte-counter}{sep}{2-byte-optional-node-id}{sep}{4-byte-random}

  49. def toStandardString(): String

    {upper 4-bytes of 6-byte millis since epoch}-{lower 2-bytes of 6-byte millis since epoch}-{2-byte-counter}-{2-byte-optional-node-id}-{4-byte-random}

  50. def toString(): String
    Definition Classes
    UUID → AnyRef → Any
  51. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  52. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  53. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from Ordered[UUID]

Inherited from Comparable[UUID]

Inherited from AnyRef

Inherited from Any

Ungrouped