Class SchemaData


  • public final class SchemaData
    extends java.lang.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
    • Constructor Detail

      • SchemaData

        public SchemaData​(java.lang.String storeName,
                          SchemaEntry keySchema)
    • Method Detail

      • getStoreName

        public java.lang.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)
      • getDerivedSchemaId

        public GeneratedSchemaID getDerivedSchemaId​(java.lang.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 java.util.Collection<SchemaEntry> getValueSchemas()
      • getReplicationMetadataSchema

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

        public java.util.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)