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.AvroStoreDeserializerCache(IntFunction<org.apache.avro.Schema> schemaGetter, Function<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
-
AvroStoreDeserializerCache
public AvroStoreDeserializerCache(IntFunction<org.apache.avro.Schema> schemaGetter, Function<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). This variant assumes that the deserializer only needs the writer schema which is true for the case Protocol Buffers.- Parameters:
schemaGetter- Function to retrieve schema by schema IDdeserializerGetter- Function to create deserializer given the writer schema
-
-
Method Details
-
getDeserializer
- Specified by:
getDeserializerin interfaceStoreDeserializerCache<T>
-
getDeserializer
- Specified by:
getDeserializerin interfaceStoreDeserializerCache<T>
-