Package com.linkedin.venice.writer
Class SchemaFetcherBackedStoreSchemaCache
java.lang.Object
com.linkedin.venice.writer.SchemaFetcherBackedStoreSchemaCache
This class uses a 
StoreSchemaFetcher to fetch value / update schema and supserset schema ID and store into
 cache for fast retrieval.
 Note that it does NOT automatically refresh schema information. Once a new value schema is registered in the backend,
 superset schema can also be changed. User of this class can invoke maybeUpdateSupersetSchema(int) to
 explicitly check against an incoming value schema and potentially update schema information if the value schema is not
 present in the local cache.- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidclose()intReturn the latest known superset value schema ID for partial update store.org.apache.avro.Schemaorg.apache.avro.SchemaReturn the latest update schema associated with the superset value schema ID.org.apache.avro.SchemagetValueSchema(int valueSchemaId) voidmaybeUpdateSupersetSchema(int valueSchemaId) voidPerform a mandatory refresh of the store's schema information fromStoreSchemaFetcherand update cache information.
- 
Constructor Details- 
SchemaFetcherBackedStoreSchemaCache
 
- 
- 
Method Details- 
getValueSchemapublic org.apache.avro.Schema getValueSchema(int valueSchemaId) 
- 
getSupersetSchemapublic org.apache.avro.Schema getSupersetSchema()
- 
getLatestOrSupersetSchemaIdpublic int getLatestOrSupersetSchemaId()Return the latest known superset value schema ID for partial update store. For non-partial-update store, this method will return the latest known value schema ID.
- 
getUpdateSchemapublic org.apache.avro.Schema getUpdateSchema()Return the latest update schema associated with the superset value schema ID.
- 
maybeUpdateSupersetSchemapublic void maybeUpdateSupersetSchema(int valueSchemaId) 
- 
refreshSchemaInformationpublic void refreshSchemaInformation()Perform a mandatory refresh of the store's schema information fromStoreSchemaFetcherand update cache information.
- 
close- Throws:
- IOException
 
 
-