Class GenericAvroRecord

  • All Implemented Interfaces:
    org.apache.pulsar.client.api.schema.GenericObject, org.apache.pulsar.client.api.schema.GenericRecord

    public class GenericAvroRecord
    extends java.lang.Object
    A generic avro record.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.util.List<org.apache.pulsar.client.api.schema.Field> fields  
      protected byte[] schemaVersion  
    • Constructor Summary

      Constructors 
      Constructor Description
      GenericAvroRecord​(byte[] schemaVersion, org.apache.avro.Schema schema, java.util.List<org.apache.pulsar.client.api.schema.Field> fields, org.apache.avro.generic.GenericRecord record)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.apache.avro.generic.GenericRecord getAvroRecord()  
      java.lang.Object getField​(java.lang.String fieldName)  
      java.util.List<org.apache.pulsar.client.api.schema.Field> getFields()  
      java.lang.Object getNativeObject()  
      org.apache.pulsar.common.schema.SchemaType getSchemaType()  
      byte[] getSchemaVersion()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.apache.pulsar.client.api.schema.GenericRecord

        getField
    • Field Detail

      • schemaVersion

        protected final byte[] schemaVersion
      • fields

        protected final java.util.List<org.apache.pulsar.client.api.schema.Field> fields
    • Constructor Detail

      • GenericAvroRecord

        public GenericAvroRecord​(byte[] schemaVersion,
                                 org.apache.avro.Schema schema,
                                 java.util.List<org.apache.pulsar.client.api.schema.Field> fields,
                                 org.apache.avro.generic.GenericRecord record)
    • Method Detail

      • getField

        public java.lang.Object getField​(java.lang.String fieldName)
      • getAvroRecord

        public org.apache.avro.generic.GenericRecord getAvroRecord()
      • getNativeObject

        public java.lang.Object getNativeObject()
      • getSchemaType

        public org.apache.pulsar.common.schema.SchemaType getSchemaType()
      • getSchemaVersion

        public byte[] getSchemaVersion()
        Specified by:
        getSchemaVersion in interface org.apache.pulsar.client.api.schema.GenericRecord
      • getFields

        public java.util.List<org.apache.pulsar.client.api.schema.Field> getFields()
        Specified by:
        getFields in interface org.apache.pulsar.client.api.schema.GenericRecord