Class SchemaData

java.lang.Object
com.linkedin.venice.schema.SchemaData

public final class SchemaData extends Object
This class is used to store all the schemas related to a given store: 1. key schema 2. value schemas 3. partial update schemas 4. replication metadata schemas
  • Field Details

    • UNKNOWN_SCHEMA_ID

      public static final int UNKNOWN_SCHEMA_ID
      See Also:
    • INVALID_VALUE_SCHEMA_ID

      public static final int INVALID_VALUE_SCHEMA_ID
      See Also:
    • DUPLICATE_VALUE_SCHEMA_CODE

      public static final int DUPLICATE_VALUE_SCHEMA_CODE
      See Also:
  • Constructor Details

  • Method Details

    • getStoreName

      public String getStoreName()
    • getKeySchema

      public SchemaEntry getKeySchema()
      Returns:
      the key SchemaEntry, which may temporarily be null soon after store initialization...
    • setKeySchema

      public void setKeySchema(SchemaEntry keySchema)
    • getValueSchema

      public SchemaEntry getValueSchema(int id)
    • addValueSchema

      public void addValueSchema(SchemaEntry valueSchema)
    • getDerivedSchema

      public DerivedSchemaEntry getDerivedSchema(int valueSchemaId, int derivedSchemaId)
    • getDerivedSchemas

      public Collection<DerivedSchemaEntry> getDerivedSchemas()
    • getDerivedSchemaId

      public GeneratedSchemaID getDerivedSchemaId(String schemaStr)
    • addDerivedSchema

      public void addDerivedSchema(DerivedSchemaEntry derivedSchemaEntry)
    • getMaxValueSchemaId

      public int getMaxValueSchemaId()
    • getSchemaID

      public int getSchemaID(SchemaEntry entry)
      Return the schema ID of any schema that has the same parsing canonical form as the schema provided.
      Parameters:
      entry - The SchemaEntry for which the schema ID is needed
      Returns:
      The ID of the schema that has the same parsing canonical form as the schema provided
    • getValueSchemas

      public Collection<SchemaEntry> getValueSchemas()
    • getReplicationMetadataSchema

      public RmdSchemaEntry getReplicationMetadataSchema(int valueSchemaId, int replicationMetadataVersionId)
    • getReplicationMetadataSchemas

      public Collection<RmdSchemaEntry> getReplicationMetadataSchemas()
    • addReplicationMetadataSchema

      public void addReplicationMetadataSchema(RmdSchemaEntry rmdSchemaEntry)
    • hasUpdateSchema

      public boolean hasUpdateSchema(int valueSchemaId)
    • hasRmdSchema

      public boolean hasRmdSchema(int valueSchemaId)
    • deleteValueSchema

      public void deleteValueSchema(SchemaEntry valueSchema)