Interface GenericSchema<T extends GenericRecord>
A schema that serializes and deserializes between
GenericRecord
and bytes.-
Field Summary
Fields inherited from interface org.apache.pulsar.client.api.Schema
BOOL, BYTEBUFFER, BYTES, DATE, DOUBLE, FLOAT, INSTANT, INT16, INT32, INT64, INT8, LOCAL_DATE, LOCAL_DATE_TIME, LOCAL_TIME, STRING, TIME, TIMESTAMP
-
Method Summary
Modifier and TypeMethodDescriptionReturns the list of fields.Create a builder to buildGenericRecord
.static GenericSchema
of
(SchemaInfo schemaInfo) static GenericSchema
of
(SchemaInfo schemaInfo, boolean useProvidedSchemaAsReaderSchema) Methods inherited from interface org.apache.pulsar.client.api.Schema
clone, configureSchemaInfo, decode, decode, decode, decode, encode, getNativeSchema, getSchemaInfo, requireFetchingSchemaInfo, setSchemaInfoProvider, supportSchemaVersioning, validate
-
Method Details
-
getFields
Returns the list of fields.- Returns:
- the list of fields of generic record.
-
newRecordBuilder
GenericRecordBuilder newRecordBuilder()Create a builder to buildGenericRecord
.- Returns:
- generic record builder
-
of
-
of
-