Class DaVinciRecordTransformerRecordMetadata

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

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

  • Constructor Details

    • DaVinciRecordTransformerRecordMetadata

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

      public DaVinciRecordTransformerRecordMetadata(int writerSchemaId, long timestamp, PubSubPosition pubSubPosition, int payloadSize, ByteBuffer replicationMetadataPayload, int replicationMetadataVersionId)
  • 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 UNSPECIFIED_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.
    • getReplicationMetadataVersionId

      public int getReplicationMetadataVersionId()
      Returns:
      the corresponding replication metadata schema version id used to serialize the payload. If the payload is null the corresponding id will be -1.