Class PulsarRecord<T>

java.lang.Object
org.apache.pulsar.functions.source.PulsarRecord<T>
All Implemented Interfaces:
org.apache.pulsar.functions.api.Record<T>, RecordWithEncryptionContext<T>

public class PulsarRecord<T> extends Object implements RecordWithEncryptionContext<T>
  • Constructor Details

    • PulsarRecord

      public PulsarRecord()
  • Method Details

    • getKey

      public Optional<String> getKey()
      Specified by:
      getKey in interface org.apache.pulsar.functions.api.Record<T>
    • getTopicName

      public Optional<String> getTopicName()
      Specified by:
      getTopicName in interface org.apache.pulsar.functions.api.Record<T>
    • getPartitionIndex

      public Optional<Integer> getPartitionIndex()
      Specified by:
      getPartitionIndex in interface org.apache.pulsar.functions.api.Record<T>
    • getPartitionId

      public Optional<String> getPartitionId()
      Specified by:
      getPartitionId in interface org.apache.pulsar.functions.api.Record<T>
    • getRecordSequence

      public Optional<Long> getRecordSequence()
      Specified by:
      getRecordSequence in interface org.apache.pulsar.functions.api.Record<T>
    • getValue

      public T getValue()
      Specified by:
      getValue in interface org.apache.pulsar.functions.api.Record<T>
    • getSchema

      public org.apache.pulsar.client.api.Schema<T> getSchema()
      Specified by:
      getSchema in interface org.apache.pulsar.functions.api.Record<T>
    • getEventTime

      public Optional<Long> getEventTime()
      Specified by:
      getEventTime in interface org.apache.pulsar.functions.api.Record<T>
    • getEncryptionCtx

      public Optional<org.apache.pulsar.common.api.EncryptionContext> getEncryptionCtx()
      Description copied from interface: RecordWithEncryptionContext
      Retrieves encryption-context that is attached to record.
      Specified by:
      getEncryptionCtx in interface RecordWithEncryptionContext<T>
      Returns:
      Optional<EncryptionContext>
    • getProperties

      public Map<String,String> getProperties()
      Specified by:
      getProperties in interface org.apache.pulsar.functions.api.Record<T>
    • getMessageId

      public org.apache.pulsar.client.api.MessageId getMessageId()
    • ack

      public void ack()
      Specified by:
      ack in interface org.apache.pulsar.functions.api.Record<T>
    • fail

      public void fail()
      Specified by:
      fail in interface org.apache.pulsar.functions.api.Record<T>
    • getMessage

      public Optional<org.apache.pulsar.client.api.Message<T>> getMessage()
      Specified by:
      getMessage in interface org.apache.pulsar.functions.api.Record<T>