Class SchemaDefinitionBuilderImpl<T>

  • All Implemented Interfaces:
    org.apache.pulsar.client.api.schema.SchemaDefinitionBuilder<T>

    public class SchemaDefinitionBuilderImpl<T>
    extends java.lang.Object
    implements org.apache.pulsar.client.api.schema.SchemaDefinitionBuilder<T>
    Builder to build GenericRecord.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.apache.pulsar.client.api.schema.SchemaDefinitionBuilder<T> addProperty​(java.lang.String key, java.lang.String value)  
      org.apache.pulsar.client.api.schema.SchemaDefinition<T> build()  
      org.apache.pulsar.client.api.schema.SchemaDefinitionBuilder<T> withAlwaysAllowNull​(boolean alwaysAllowNull)  
      org.apache.pulsar.client.api.schema.SchemaDefinitionBuilder<T> withClassLoader​(java.lang.ClassLoader classLoader)  
      org.apache.pulsar.client.api.schema.SchemaDefinitionBuilder<T> withJsonDef​(java.lang.String jsonDef)  
      org.apache.pulsar.client.api.schema.SchemaDefinitionBuilder<T> withJSR310ConversionEnabled​(boolean jsr310ConversionEnabled)  
      org.apache.pulsar.client.api.schema.SchemaDefinitionBuilder<T> withPojo​(java.lang.Class clazz)  
      org.apache.pulsar.client.api.schema.SchemaDefinitionBuilder<T> withProperties​(java.util.Map<java.lang.String,​java.lang.String> properties)  
      org.apache.pulsar.client.api.schema.SchemaDefinitionBuilder<T> withSchemaReader​(org.apache.pulsar.client.api.schema.SchemaReader<T> reader)  
      org.apache.pulsar.client.api.schema.SchemaDefinitionBuilder<T> withSchemaWriter​(org.apache.pulsar.client.api.schema.SchemaWriter<T> writer)  
      org.apache.pulsar.client.api.schema.SchemaDefinitionBuilder<T> withSupportSchemaVersioning​(boolean supportSchemaVersioning)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • ALWAYS_ALLOW_NULL

        public static final java.lang.String ALWAYS_ALLOW_NULL
        See Also:
        Constant Field Values
      • JSR310_CONVERSION_ENABLED

        public static final java.lang.String JSR310_CONVERSION_ENABLED
        See Also:
        Constant Field Values
    • Constructor Detail

      • SchemaDefinitionBuilderImpl

        public SchemaDefinitionBuilderImpl()
    • Method Detail

      • withAlwaysAllowNull

        public org.apache.pulsar.client.api.schema.SchemaDefinitionBuilder<T> withAlwaysAllowNull​(boolean alwaysAllowNull)
        Specified by:
        withAlwaysAllowNull in interface org.apache.pulsar.client.api.schema.SchemaDefinitionBuilder<T>
      • withJSR310ConversionEnabled

        public org.apache.pulsar.client.api.schema.SchemaDefinitionBuilder<T> withJSR310ConversionEnabled​(boolean jsr310ConversionEnabled)
        Specified by:
        withJSR310ConversionEnabled in interface org.apache.pulsar.client.api.schema.SchemaDefinitionBuilder<T>
      • addProperty

        public org.apache.pulsar.client.api.schema.SchemaDefinitionBuilder<T> addProperty​(java.lang.String key,
                                                                                          java.lang.String value)
        Specified by:
        addProperty in interface org.apache.pulsar.client.api.schema.SchemaDefinitionBuilder<T>
      • withPojo

        public org.apache.pulsar.client.api.schema.SchemaDefinitionBuilder<T> withPojo​(java.lang.Class clazz)
        Specified by:
        withPojo in interface org.apache.pulsar.client.api.schema.SchemaDefinitionBuilder<T>
      • withClassLoader

        public org.apache.pulsar.client.api.schema.SchemaDefinitionBuilder<T> withClassLoader​(java.lang.ClassLoader classLoader)
        Specified by:
        withClassLoader in interface org.apache.pulsar.client.api.schema.SchemaDefinitionBuilder<T>
      • withJsonDef

        public org.apache.pulsar.client.api.schema.SchemaDefinitionBuilder<T> withJsonDef​(java.lang.String jsonDef)
        Specified by:
        withJsonDef in interface org.apache.pulsar.client.api.schema.SchemaDefinitionBuilder<T>
      • withSupportSchemaVersioning

        public org.apache.pulsar.client.api.schema.SchemaDefinitionBuilder<T> withSupportSchemaVersioning​(boolean supportSchemaVersioning)
        Specified by:
        withSupportSchemaVersioning in interface org.apache.pulsar.client.api.schema.SchemaDefinitionBuilder<T>
      • withProperties

        public org.apache.pulsar.client.api.schema.SchemaDefinitionBuilder<T> withProperties​(java.util.Map<java.lang.String,​java.lang.String> properties)
        Specified by:
        withProperties in interface org.apache.pulsar.client.api.schema.SchemaDefinitionBuilder<T>
      • withSchemaReader

        public org.apache.pulsar.client.api.schema.SchemaDefinitionBuilder<T> withSchemaReader​(org.apache.pulsar.client.api.schema.SchemaReader<T> reader)
        Specified by:
        withSchemaReader in interface org.apache.pulsar.client.api.schema.SchemaDefinitionBuilder<T>
      • withSchemaWriter

        public org.apache.pulsar.client.api.schema.SchemaDefinitionBuilder<T> withSchemaWriter​(org.apache.pulsar.client.api.schema.SchemaWriter<T> writer)
        Specified by:
        withSchemaWriter in interface org.apache.pulsar.client.api.schema.SchemaDefinitionBuilder<T>
      • build

        public org.apache.pulsar.client.api.schema.SchemaDefinition<T> build()
        Specified by:
        build in interface org.apache.pulsar.client.api.schema.SchemaDefinitionBuilder<T>