Interface ReadWriteSchemaRepository

All Superinterfaces:
ReadOnlySchemaRepository, VeniceResource
All Known Implementing Classes:
HelixReadWriteSchemaRepository, HelixReadWriteSchemaRepositoryAdapter

public interface ReadWriteSchemaRepository extends ReadOnlySchemaRepository
  • Method Details

    • initKeySchema

      SchemaEntry initKeySchema(String storeName, String schemaStr)
      Set up key schema for the given store
    • addValueSchema

      default SchemaEntry addValueSchema(String storeName, String schemaStr)
      Add a new value schema for the given store
    • addValueSchema

      SchemaEntry addValueSchema(String storeName, String schemaStr, DirectionalSchemaCompatibilityType expectedCompatibilityType)
      Add a new value schema for the given store
    • addValueSchema

      SchemaEntry addValueSchema(String storeName, String schemaStr, int schemaId)
      Add a new value schema for the given store by specifying schema id. This API is mostly intended to be used in cross-colo mode. When there are multiple colos, we'd like to have consistent value id across colos, so that deserializer can work properly while reading records. Caller should figure out the schema id number by themselves. TODO: Might want to remove it from the interface and make it invisible from the outside
    • addDerivedSchema

      DerivedSchemaEntry addDerivedSchema(String storeName, String schemaStr, int valueSchemaId)
      Add a new derived schema for the given store and value schema id
    • addDerivedSchema

      DerivedSchemaEntry addDerivedSchema(String storeName, String schemaStr, int valueSchemaId, int derivedSchemaId)
      Add a new derived schema for the given store by specifying derived schema id. Mostly used in cross-colo mode.
    • removeDerivedSchema

      DerivedSchemaEntry removeDerivedSchema(String storeName, int valueSchemaId, int derivedSchemaId)
      Remove an existing derived schema
      Returns:
      the derived schema that is deleted or null if the schema doesn't exist
    • preCheckValueSchemaAndGetNextAvailableId

      int preCheckValueSchemaAndGetNextAvailableId(String storeName, String valueSchemaStr, DirectionalSchemaCompatibilityType expectedCompatibilityType)
    • preCheckDerivedSchemaAndGetNextAvailableId

      int preCheckDerivedSchemaAndGetNextAvailableId(String storeName, int valueSchemaId, String derivedSchemaStr)
    • addReplicationMetadataSchema

      RmdSchemaEntry addReplicationMetadataSchema(String storeName, int valueSchemaId, String replicationMetadataSchemaStr, int replicationMetadataVersionId)
    • removeValueSchema

      void removeValueSchema(String storeName, int schemaID)