public interface SchemaDefinitionBuilder<T>
SchemaDefinition
.Modifier and Type | Method and Description |
---|---|
SchemaDefinitionBuilder<T> |
addProperty(String key,
String value)
Set schema info properties.
|
SchemaDefinition<T> |
build()
Build the schema definition.
|
SchemaDefinitionBuilder<T> |
withAlwaysAllowNull(boolean alwaysAllowNull)
Set schema whether always allow null or not.
|
SchemaDefinitionBuilder<T> |
withJsonDef(String jsonDefinition)
Set schema of json definition.
|
SchemaDefinitionBuilder<T> |
withJSR310ConversionEnabled(boolean jsr310ConversionEnabled)
Set schema use JRS310 conversion or not.
|
SchemaDefinitionBuilder<T> |
withPojo(Class pojo)
Set schema of pojo definition.
|
SchemaDefinitionBuilder<T> |
withProperties(Map<String,String> properties)
Set schema info properties.
|
SchemaDefinitionBuilder<T> |
withSupportSchemaVersioning(boolean supportSchemaVersioning)
Set schema whether decode by schema version.
|
SchemaDefinitionBuilder<T> withAlwaysAllowNull(boolean alwaysAllowNull)
alwaysAllowNull
- definition null or notSchemaDefinitionBuilder<T> withJSR310ConversionEnabled(boolean jsr310ConversionEnabled)
Before Avro 1.9 the Joda time library was used for handling the logical date(time) values. But since the introduction of Java8 the Java Specification Request (JSR) 310 has been included, which greatly improves the handling of date and time natively. To keep forwarding compatibility, default is use Joda time conversion.
JSR310 conversion is recommended here. Joda time conversion is has been marked deprecated. In future versions, joda time conversion may be removed
jsr310ConversionEnabled
- use JRS310 conversion or not, default is false for keep forwarding compatibilitySchemaDefinitionBuilder<T> withProperties(Map<String,String> properties)
properties
- schema info propertiesSchemaDefinitionBuilder<T> addProperty(String key, String value)
key
- property keyvalue
- property valueSchemaDefinitionBuilder<T> withPojo(Class pojo)
pojo
- pojo schema definitionSchemaDefinitionBuilder<T> withJsonDef(String jsonDefinition)
jsonDefinition
- json schema definitionSchemaDefinitionBuilder<T> withSupportSchemaVersioning(boolean supportSchemaVersioning)
supportSchemaVersioning
- decode by versionSchemaDefinition<T> build()
Copyright © 2017–2020 Apache Software Foundation. All rights reserved.