Class/Object

fm.common

UUID

Related Docs: object UUID | package common

Permalink

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

Linear Supertypes
Serializable, Serializable, Product, Equals, Ordered[UUID], Comparable[UUID], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. UUID
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. Ordered
  7. Comparable
  8. AnyRef
  9. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

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

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. def <(that: UUID): Boolean

    Permalink
    Definition Classes
    Ordered
  4. def <=(that: UUID): Boolean

    Permalink
    Definition Classes
    Ordered
  5. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  6. def >(that: UUID): Boolean

    Permalink
    Definition Classes
    Ordered
  7. def >=(that: UUID): Boolean

    Permalink
    Definition Classes
    Ordered
  8. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  9. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. def compare(that: UUID): Int

    Permalink
    Definition Classes
    UUID → Ordered
  11. def compareTo(that: UUID): Int

    Permalink
    Definition Classes
    Ordered → Comparable
  12. def counter: Int

    Permalink

    Between 0 and 65535 (both inclusive)

  13. def date: ImmutableDate

    Permalink

    The fm.common.ImmutableDate represented by the epochMilli

  14. def epochMilli: Long

    Permalink

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

  15. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  16. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  17. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  18. def instant: Instant

    Permalink

    The java.time.Instant represented by the epochMilli

  19. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  20. def isRandomNodeId: Boolean

    Permalink

    Is this UUID using a random node id?

  21. def isSignedMaxValue: Boolean

    Permalink
  22. def isSignedMinValue: Boolean

    Permalink
  23. def isUnsignedMaxValue: Boolean

    Permalink
  24. def isZero: Boolean

    Permalink
  25. def javaDate: Date

    Permalink

    The java.util.Date represented by the epochMilli

  26. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  27. def nodeId: Int

    Permalink

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

  28. val nodeIdAndRandom: Long

    Permalink
  29. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  30. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  31. def random: Long

    Permalink

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

  32. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  33. val timeAndCounter: Long

    Permalink
  34. def toBase16(): String

    Permalink
  35. def toBase58(): String

    Permalink
  36. def toBase64(): String

    Permalink
  37. def toBase64NoPadding(): String

    Permalink
  38. def toBase64URL(): String

    Permalink
  39. def toBase64URLNoPadding(): String

    Permalink
  40. def toBigInt: BigInt

    Permalink
  41. def toBigInteger: BigInteger

    Permalink
  42. def toByteArray(): Array[Byte]

    Permalink
  43. def toHex(): String

    Permalink
  44. def toImmutableByteArray(): ImmutableArray[Byte]

    Permalink
  45. def toJavaUUID: java.util.UUID

    Permalink
  46. def toPrettyString(sep: Char): String

    Permalink

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

  47. def toPrettyString(): String

    Permalink

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

  48. def toStandardString(sep: Char): String

    Permalink

    {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

    Permalink

    {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

    Permalink
    Definition Classes
    UUID → AnyRef → Any
  51. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  52. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  53. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from Ordered[UUID]

Inherited from Comparable[UUID]

Inherited from AnyRef

Inherited from Any

Ungrouped