Object

org.locationtech.geomesa.utils.uuid

TimeSortedUuidGenerator

Related Doc: package uuid

Permalink

object TimeSortedUuidGenerator extends RandomLsbUuidGenerator

UUID generator that creates UUIDs that sort by creation time (useful for accumulo).

Uses variant 2 (IETF) and version 4 (for random UUIDs, although it's not totally random). See https://en.wikipedia.org/wiki/Universally_unique_identifier#Variants_and_versions

Using a version 1 (time based) UUID doesn't ensure uniqueness when running in different processes on the same machine (at least not without some complicated distributed locking), as MAC address (or IP address) is the unique factor.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. TimeSortedUuidGenerator
  2. RandomLsbUuidGenerator
  3. Version4UuidGenerator
  4. AnyRef
  5. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Value Members

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. def createRandomLsb(): Long

    Permalink

    Creates the random part of the uuid.

    Creates the random part of the uuid.

    Definition Classes
    RandomLsbUuidGenerator
  7. def createUuid(time: Long = System.currentTimeMillis()): UUID

    Permalink

    Creates a UUID where the first 8 bytes are based on the current time and the second 8 bytes are based on a random number.

    Creates a UUID where the first 8 bytes are based on the current time and the second 8 bytes are based on a random number. This should provide uniqueness along with sorting by date.

    Doesn't support negative time values.

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

    Permalink
    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit

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

    Permalink
    Definition Classes
    AnyRef → Any
  12. def getTempByteArray: Array[Byte]

    Permalink

    Gets a reusable byte array of length 8.

    Gets a reusable byte array of length 8. This is a thread-local value, so be careful how it's used.

    Definition Classes
    Version4UuidGenerator
  13. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  14. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  15. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  16. final def notify(): Unit

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

    Permalink
    Definition Classes
    AnyRef
  18. def setVariant(bytes: Array[Byte]): Unit

    Permalink

    Sets the variant number for the UUID.

    Sets the variant number for the UUID. This overwrites the first 2 bits of the 1st byte. Expects an 8 byte array that is the least significant half of the UUID.

    Definition Classes
    Version4UuidGenerator
  19. def setVersion(bytes: Array[Byte]): Unit

    Permalink

    Sets the version number for the UUID.

    Sets the version number for the UUID. This overwrites the first 4 bits of the 7th byte. Expects an 8 byte array that is the most significant half of the UUID.

    Definition Classes
    Version4UuidGenerator
  20. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  21. def toString(): String

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

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

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

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

Inherited from RandomLsbUuidGenerator

Inherited from Version4UuidGenerator

Inherited from AnyRef

Inherited from Any

Ungrouped