Class AvroStoreDeserializerCache<T>
java.lang.Object
com.linkedin.venice.serialization.AvroStoreDeserializerCache<T>
- All Implemented Interfaces:
StoreDeserializerCache<T>
Container for the deserializers of a single store.
-
Constructor Summary
ConstructorsConstructorDescriptionAvroStoreDeserializerCache(ReadOnlySchemaRepository schemaRepository, String storeName, boolean fastAvroEnabled) AvroStoreDeserializerCache(SchemaReader schemaReader) AvroStoreDeserializerCache(IntFunction<org.apache.avro.Schema> schemaGetter, BiFunction<org.apache.avro.Schema, org.apache.avro.Schema, RecordDeserializer<T>> deserializerGetter) Constructor that allows custom deserializer factory to be provided. -
Method Summary
Modifier and TypeMethodDescriptiongetDeserializer(int writerSchemaId) getDeserializer(int writerSchemaId, int readerSchemaId)
-
Constructor Details
-
AvroStoreDeserializerCache
public AvroStoreDeserializerCache(ReadOnlySchemaRepository schemaRepository, String storeName, boolean fastAvroEnabled) -
AvroStoreDeserializerCache
-
AvroStoreDeserializerCache
public AvroStoreDeserializerCache(IntFunction<org.apache.avro.Schema> schemaGetter, BiFunction<org.apache.avro.Schema, org.apache.avro.Schema, RecordDeserializer<T>> deserializerGetter) Constructor that allows custom deserializer factory to be provided. This enables support for custom serialization formats (e.g., Protocol Buffers) while reusing the caching infrastructure.- Parameters:
schemaGetter- Function to retrieve schema by schema IDdeserializerGetter- Function to create deserializer given writer and reader schemas
-
-
Method Details
-
getDeserializer
- Specified by:
getDeserializerin interfaceStoreDeserializerCache<T>
-
getDeserializer
- Specified by:
getDeserializerin interfaceStoreDeserializerCache<T>
-