@PolarisImmutable public interface ObjRef
Describes a reference to an object.

Note that the persisted object key is just the integer ID, the object type and numParts() attributes are rather hints.

  • Field Details

  • Method Details

    • objRef

      static ObjRef objRef(@Nonnull String type, long id, int partNum)
    • objRef

      static ObjRef objRef(@Nonnull ObjType type, long id, int partNum)
    • objRef

      static ObjRef objRef(@Nonnull String type, long id)
    • objRef

      static ObjRef objRef(@Nonnull ObjType type, long id)
    • objRef

      static ObjRef objRef(@Nonnull Obj obj)
    • type

      @Parameter(order=1) String type()
      Object type ID this object reference refers to.
    • id

      @Parameter(order=2) long id()
      Numeric ID of this object reference.
    • numParts

      @Parameter(order=3) @Auxiliary int numParts()
      Indicates the number of parts of which the object is split in the backing database. This value is available after the object has been written.

      This value is rather a hint than a strictly correct value. This value should be correct, but Persistence implementations must expect the case that the real number of written parts is different.

    • toByteBuffer

      default ByteBuffer toByteBuffer()
    • serializedNullSize

      static int serializedNullSize()
    • serializedSize

      default int serializedSize()
    • serializeNullToByteBuffer

      static ByteBuffer serializeNullToByteBuffer(ByteBuffer target)
    • serializeToByteBuffer

      default ByteBuffer serializeToByteBuffer(ByteBuffer bytes)
    • toBytes

      default byte[] toBytes()
    • skipObjId

      static ByteBuffer skipObjId(@Nonnull ByteBuffer bytes)
    • fromByteBuffer

      static ObjRef fromByteBuffer(ByteBuffer bytes)
    • fromBytes

      static ObjRef fromBytes(byte[] bytes)