Package com.linkedin.venice.schema
Class SchemaData
java.lang.Object
com.linkedin.venice.schema.SchemaData
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 Summary
Modifier and TypeFieldDescriptionstatic final int
static final int
static final int
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addDerivedSchema
(DerivedSchemaEntry derivedSchemaEntry) void
addReplicationMetadataSchema
(RmdSchemaEntry rmdSchemaEntry) void
addValueSchema
(SchemaEntry valueSchema) void
deleteValueSchema
(SchemaEntry valueSchema) getDerivedSchema
(int valueSchemaId, int derivedSchemaId) getDerivedSchemaId
(String schemaStr) int
getReplicationMetadataSchema
(int valueSchemaId, int replicationMetadataVersionId) int
getSchemaID
(SchemaEntry entry) Return the schema ID of any schema that has the same parsing canonical form as the schema provided.getValueSchema
(int id) boolean
hasRmdSchema
(int valueSchemaId) boolean
hasUpdateSchema
(int valueSchemaId) void
setKeySchema
(SchemaEntry keySchema)
-
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
-
SchemaData
-
-
Method Details
-
getStoreName
-
getKeySchema
- Returns:
- the key
SchemaEntry
, which may temporarily be null soon after store initialization...
-
setKeySchema
-
getValueSchema
-
addValueSchema
-
getDerivedSchema
-
getDerivedSchemas
-
getDerivedSchemaId
-
addDerivedSchema
-
getMaxValueSchemaId
public int getMaxValueSchemaId() -
getSchemaID
Return the schema ID of any schema that has the same parsing canonical form as the schema provided.- Parameters:
entry
- TheSchemaEntry
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
-
getReplicationMetadataSchema
public RmdSchemaEntry getReplicationMetadataSchema(int valueSchemaId, int replicationMetadataVersionId) -
getReplicationMetadataSchemas
-
addReplicationMetadataSchema
-
hasUpdateSchema
public boolean hasUpdateSchema(int valueSchemaId) -
hasRmdSchema
public boolean hasRmdSchema(int valueSchemaId) -
deleteValueSchema
-