Class DaVinciRecordTransformerRecordMetadata

java.lang.Object
com.linkedin.davinci.client.DaVinciRecordTransformerRecordMetadata

public class DaVinciRecordTransformerRecordMetadata extends Object
Per record metadata wrapper for DaVinciRecordTransformer.
  • Field Details

    • SENTINEL_WRITER_SCHEMA_ID

      public static final int SENTINEL_WRITER_SCHEMA_ID
      See Also:
  • Constructor Details

    • DaVinciRecordTransformerRecordMetadata

      public DaVinciRecordTransformerRecordMetadata(long timestamp, PubSubPosition pubSubPosition, int payloadSize, ByteBuffer replicationMetadataPayload)
    • DaVinciRecordTransformerRecordMetadata

      public DaVinciRecordTransformerRecordMetadata(int writerSchemaId, long timestamp, PubSubPosition pubSubPosition, int payloadSize, ByteBuffer replicationMetadataPayload)
  • Method Details

    • getWriterSchemaId

      public int getWriterSchemaId()
      Returns:
      the schema ID that the record was written with if it's a PUT. If the record came from disk, or it's a DELETE, it will be SENTINEL_WRITER_SCHEMA_ID.
    • getTimestamp

      public long getTimestamp()
      Returns:
      timestamp that the record was added to the version topic If the record came from disk, it will be 0.
    • getPubSubPosition

      public PubSubPosition getPubSubPosition()
      Returns:
      the position of the record in the topic. If the record came from disk, it will be the earliest position in the topic partition.
    • getPayloadSize

      public int getPayloadSize()
      Returns:
      the size in bytes of the key + value
    • getReplicationMetadataPayload

      public ByteBuffer getReplicationMetadataPayload()
      Returns:
      the serialized replication metadata payload if it's a PUT. If the record came from disk or it's a DELETE, it will be null.