Class AvroSchemaFactoryContext

java.lang.Object
org.nuxeo.runtime.avro.AvroSchemaFactoryContext

public class AvroSchemaFactoryContext extends Object
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.
Since:
10.2
  • Field Details

  • Constructor Details

    • AvroSchemaFactoryContext

      protected AvroSchemaFactoryContext(AvroService service)
  • Method Details

    • createSchema

      public <T> org.apache.avro.Schema createSchema(T input)
    • getService

      public AvroService getService()
    • sort

      public <U> List<U> sort(Collection<U> children)
    • getFactory

      protected <T> AvroSchemaFactory<T> getFactory(T input)
    • register

      protected void register(Class<?> type, AvroSchemaFactory<?> factory)