Package org.nuxeo.runtime.avro
Class AvroSchemaFactoryContext
java.lang.Object
org.nuxeo.runtime.avro.AvroSchemaFactoryContext
An AvroSchemaFactoryContext represents a context in which Avro schemas are cached and reused depending on their
qualified name.
Avro does not permit to declare twice a schema with the same qualified name. Thus a schema has to be fully described the first time it appears in the object, and then be referred by name.
Avro does not permit to declare twice a schema with the same qualified name. Thus a schema has to be fully described the first time it appears in the object, and then be referred by name.
- Since:
- 10.2
-
Field Summary
Modifier and TypeFieldDescriptionprotected final Map<Class<?>,
AvroSchemaFactory<?>> protected final AvroService
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription<T> org.apache.avro.Schema
createSchema
(T input) protected <T> AvroSchemaFactory<T>
getFactory
(T input) protected void
register
(Class<?> type, AvroSchemaFactory<?> factory) <U> List<U>
sort
(Collection<U> children)
-
Field Details
-
factories
-
createdSchemas
-
service
-
-
Constructor Details
-
AvroSchemaFactoryContext
-
-
Method Details
-
createSchema
public <T> org.apache.avro.Schema createSchema(T input) -
getService
-
sort
-
getFactory
-
register
-