Package org.apache.avro.message
Class SchemaStore.Cache
java.lang.Object
org.apache.avro.message.SchemaStore.Cache
- All Implemented Interfaces:
SchemaStore
- Enclosing interface:
SchemaStore
A map-based cache of schemas by AVRO-CRC-64 fingerprint.
This class is thread-safe.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.avro.message.SchemaStore
SchemaStore.Cache
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a schema to this cache that can be retrieved using its AVRO-CRC-64 fingerprint.findByFingerprint
(long fingerprint) Retrieves a fingerprint by its AVRO-CRC-64 fingerprint.
-
Constructor Details
-
Cache
public Cache()
-
-
Method Details
-
addSchema
Adds a schema to this cache that can be retrieved using its AVRO-CRC-64 fingerprint.- Parameters:
schema
- aSchema
-
findByFingerprint
Description copied from interface:SchemaStore
Retrieves a fingerprint by its AVRO-CRC-64 fingerprint.- Specified by:
findByFingerprint
in interfaceSchemaStore
- Parameters:
fingerprint
- an AVRO-CRC-64 fingerprint long- Returns:
- a Schema with the given fingerprint, or null
-