Class SchemaDefinitionImpl<T>
java.lang.Object
org.apache.pulsar.client.impl.schema.SchemaDefinitionImpl<T>
- All Implemented Interfaces:
SchemaDefinition<T>
A json schema definition
SchemaDefinition for the json schema definition.-
Constructor Summary
ConstructorsConstructorDescriptionSchemaDefinitionImpl(Class<T> pojo, String jsonDef, ClassLoader classLoader, boolean alwaysAllowNull, Map<String, String> properties, boolean supportSchemaVersioning, boolean jsr310ConversionEnabled, SchemaReader<T> reader, SchemaWriter<T> writer) -
Method Summary
Modifier and TypeMethodDescriptionbooleanget schema whether always allow null or not.Get json schema definition.getPojo()Get pojo schema definition.Get schema class.booleanboolean
-
Constructor Details
-
SchemaDefinitionImpl
public SchemaDefinitionImpl(Class<T> pojo, String jsonDef, ClassLoader classLoader, boolean alwaysAllowNull, Map<String, String> properties, boolean supportSchemaVersioning, boolean jsr310ConversionEnabled, SchemaReader<T> reader, SchemaWriter<T> writer)
-
-
Method Details
-
getAlwaysAllowNull
public boolean getAlwaysAllowNull()get schema whether always allow null or not.- Specified by:
getAlwaysAllowNullin interfaceSchemaDefinition<T>- Returns:
- schema always null or not
-
isJsr310ConversionEnabled
public boolean isJsr310ConversionEnabled()- Specified by:
isJsr310ConversionEnabledin interfaceSchemaDefinition<T>
-
getJsonDef
Get json schema definition.- Specified by:
getJsonDefin interfaceSchemaDefinition<T>- Returns:
- schema class
-
getPojo
Get pojo schema definition.- Specified by:
getPojoin interfaceSchemaDefinition<T>- Returns:
- pojo class
-
getClassLoader
- Specified by:
getClassLoaderin interfaceSchemaDefinition<T>
-
getSupportSchemaVersioning
public boolean getSupportSchemaVersioning()- Specified by:
getSupportSchemaVersioningin interfaceSchemaDefinition<T>
-
getSchemaReaderOpt
- Specified by:
getSchemaReaderOptin interfaceSchemaDefinition<T>
-
getSchemaWriterOpt
- Specified by:
getSchemaWriterOptin interfaceSchemaDefinition<T>
-
getProperties
Get schema class.- Specified by:
getPropertiesin interfaceSchemaDefinition<T>- Returns:
- schema class
-