Interface TypedRecord<T extends UnifiedRecordValue>

All Superinterfaces:
JsonSerializable, Record<T>
All Known Implementing Classes:
TypedRecordImpl, UnwrittenRecord

public interface TypedRecord<T extends UnifiedRecordValue> extends Record<T>
  • Method Details

    • getKey

      long getKey()
      Specified by:
      getKey in interface Record<T extends UnifiedRecordValue>
    • getValue

      T getValue()
      Specified by:
      getValue in interface Record<T extends UnifiedRecordValue>
    • getRequestStreamId

      int getRequestStreamId()
    • getRequestId

      long getRequestId()
    • getLength

      int getLength()
    • hasRequestMetadata

      default boolean hasRequestMetadata()
    • isCommandDistributed

      default boolean isCommandDistributed()
      Returns whether the record was distributed by a different partition. It can do so by decoding the partition from the key and comparing it against the partition id of this record. If these match the key was generated by the current partition. If not, the key was generated by a different partition and then distributed to the current partition. Some commands will not have a key, indicated by -1. This cannot occur when the command is distributed.
      Returns:
      a boolean indicating if the key was generated on the current partition