Class SchemaDefinitionImpl<T>

java.lang.Object
org.apache.pulsar.client.impl.schema.SchemaDefinitionImpl<T>
All Implemented Interfaces:
org.apache.pulsar.client.api.schema.SchemaDefinition<T>

public class SchemaDefinitionImpl<T> extends Object implements org.apache.pulsar.client.api.schema.SchemaDefinition<T>
A json schema definition SchemaDefinition for the json schema definition.
  • Constructor Details

    • SchemaDefinitionImpl

      public SchemaDefinitionImpl(Class<T> pojo, String jsonDef, ClassLoader classLoader, boolean alwaysAllowNull, Map<String,String> properties, boolean supportSchemaVersioning, boolean jsr310ConversionEnabled, org.apache.pulsar.client.api.schema.SchemaReader<T> reader, org.apache.pulsar.client.api.schema.SchemaWriter<T> writer)
  • Method Details

    • getAlwaysAllowNull

      public boolean getAlwaysAllowNull()
      get schema whether always allow null or not.
      Specified by:
      getAlwaysAllowNull in interface org.apache.pulsar.client.api.schema.SchemaDefinition<T>
      Returns:
      schema always null or not
    • isJsr310ConversionEnabled

      public boolean isJsr310ConversionEnabled()
      Specified by:
      isJsr310ConversionEnabled in interface org.apache.pulsar.client.api.schema.SchemaDefinition<T>
    • getJsonDef

      public String getJsonDef()
      Get json schema definition.
      Specified by:
      getJsonDef in interface org.apache.pulsar.client.api.schema.SchemaDefinition<T>
      Returns:
      schema class
    • getPojo

      public Class<T> getPojo()
      Get pojo schema definition.
      Specified by:
      getPojo in interface org.apache.pulsar.client.api.schema.SchemaDefinition<T>
      Returns:
      pojo class
    • getClassLoader

      public ClassLoader getClassLoader()
      Specified by:
      getClassLoader in interface org.apache.pulsar.client.api.schema.SchemaDefinition<T>
    • getSupportSchemaVersioning

      public boolean getSupportSchemaVersioning()
      Specified by:
      getSupportSchemaVersioning in interface org.apache.pulsar.client.api.schema.SchemaDefinition<T>
    • getSchemaReaderOpt

      public Optional<org.apache.pulsar.client.api.schema.SchemaReader<T>> getSchemaReaderOpt()
      Specified by:
      getSchemaReaderOpt in interface org.apache.pulsar.client.api.schema.SchemaDefinition<T>
    • getSchemaWriterOpt

      public Optional<org.apache.pulsar.client.api.schema.SchemaWriter<T>> getSchemaWriterOpt()
      Specified by:
      getSchemaWriterOpt in interface org.apache.pulsar.client.api.schema.SchemaDefinition<T>
    • getProperties

      public Map<String,String> getProperties()
      Get schema class.
      Specified by:
      getProperties in interface org.apache.pulsar.client.api.schema.SchemaDefinition<T>
      Returns:
      schema class