Class BinarySchemaRegistry


  • public class BinarySchemaRegistry
    extends Object
    Binary schema registry. Contains all well-known object schemas.

    We rely on the fact that usually object has only few different schemas. For this reason we inline several of them with optional fallback to normal hash map lookup.

    • Constructor Detail

      • BinarySchemaRegistry

        public BinarySchemaRegistry()
    • Method Detail

      • schema

        @Nullable
        public @Nullable BinarySchema schema​(int schemaId)
        Get schema for the given ID. We rely on very relaxed memory semantics here assuming that it is not critical to return false-positive null values.
        Parameters:
        schemaId - Schema ID.
        Returns:
        Schema or null.
      • addSchema

        public void addSchema​(int schemaId,
                              BinarySchema schema)
        Add schema.
        Parameters:
        schemaId - Schema ID.
        schema - Schema.