Interface ReadWriteSchemaRepository

    • Method Detail

      • initKeySchema

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

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

        SchemaEntry addValueSchema​(java.lang.String storeName,
                                   java.lang.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​(java.lang.String storeName,
                                            java.lang.String schemaStr,
                                            int valueSchemaId)
        Add a new derived schema for the given store and value schema id
      • addDerivedSchema

        DerivedSchemaEntry addDerivedSchema​(java.lang.String storeName,
                                            java.lang.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​(java.lang.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​(java.lang.String storeName,
                                                     java.lang.String valueSchemaStr,
                                                     DirectionalSchemaCompatibilityType expectedCompatibilityType)
      • preCheckDerivedSchemaAndGetNextAvailableId

        int preCheckDerivedSchemaAndGetNextAvailableId​(java.lang.String storeName,
                                                       int valueSchemaId,
                                                       java.lang.String derivedSchemaStr)
      • addReplicationMetadataSchema

        RmdSchemaEntry addReplicationMetadataSchema​(java.lang.String storeName,
                                                    int valueSchemaId,
                                                    java.lang.String replicationMetadataSchemaStr,
                                                    int replicationMetadataVersionId)
      • removeValueSchema

        void removeValueSchema​(java.lang.String storeName,
                               int schemaID)