Interface JObjectKey

All Superinterfaces:
Comparable<JObjectKey>, Serializable
All Known Implementing Classes:
JObjectKeyImpl, JObjectKeyMax, JObjectKeyMin

public sealed interface JObjectKey extends Serializable, Comparable<JObjectKey> permits JObjectKeyImpl, JObjectKeyMax, JObjectKeyMin
JObjectKey is an interface for object keys to be used in the object store.
  • Field Details

  • Method Details

    • of

      static JObjectKey of(String value)
      Creates a new JObjectKey from a string value.
      Parameters:
      value - the string value of the key
      Returns:
      a new JObjectKey
    • random

      static JObjectKey random()
      Creates a new JObjectKey with a random UUID.
      Returns:
      a new JObjectKey with a random UUID
    • first

      static JObjectKey first()
      Returns a JObjectKey that compares less than all other keys. Calling value on this key will result in an exception.
      Returns:
      a JObjectKey that compares less than all other keys
    • last

      static JObjectKey last()
      Returns a JObjectKey that compares greater than all other keys. Calling value on this key will result in an exception.
      Returns:
      a JObjectKey that compares greater than all other keys
    • fromBytes

      static JObjectKey fromBytes(byte[] bytes)
      Creates a new JObjectKey from a byte array.
      Parameters:
      bytes - the byte array representing the key
      Returns:
      a new JObjectKey
    • fromByteBuffer

      static JObjectKey fromByteBuffer(ByteBuffer buff)
      Creates a new JObjectKey from a ByteBuffer.
      Parameters:
      buff - the ByteBuffer representing the key
      Returns:
      a new JObjectKey
    • compareTo

      int compareTo(JObjectKey o)
      Specified by:
      compareTo in interface Comparable<JObjectKey>
    • toString

      String toString()
      Overrides:
      toString in class Object
    • toByteBuffer

      ByteBuffer toByteBuffer()
      Returns the byte buffer representation of the key.
      Returns:
      the byte buffer representation of the key
    • value

      String value()
      Returns the string value of the key.
      Returns:
      the string value of the key