Top Description Inners Methods
org.apache.avro.message

public Interface SchemaStore

Known Direct Implementers
org.apache.avro.message.SchemaStore.Cache
Imports
org.apache.avro.Schema, .SchemaNormalization, java.util.Map, java.util.concurrent.ConcurrentHashMap

Interface for classes that can provide avro schemas by fingerprint.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
SchemaStore.Cache

A map-based cache of schemas by AVRO-CRC-64 fingerprint.

Method Summary

Modifier and TypeMethod and Description
public Schema

Returns:

a Schema with the given fingerprint, or null
findByFingerprint
(long
an AVRO-CRC-64 fingerprint long
fingerprint
)

Retrieves a fingerprint by its AVRO-CRC-64 fingerprint.

Method Detail

findByFingerprintback to summary
public Schema findByFingerprint(long fingerprint)

Retrieves a fingerprint by its AVRO-CRC-64 fingerprint.

Parameters
fingerprint:long

an AVRO-CRC-64 fingerprint long

Returns:Schema

a Schema with the given fingerprint, or null

org.apache.avro.message back to summary

public Class SchemaStore.Cache

extends Object
implements SchemaStore
Class Inheritance
All Implemented Interfaces
org.apache.avro.message.SchemaStore

A map-based cache of schemas by AVRO-CRC-64 fingerprint.

This class is thread-safe.

Field Summary

Modifier and TypeField and Description
private final Map<Long, Schema>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
addSchema(Schema schema)

Adds a schema to this cache that can be retrieved using its AVRO-CRC-64 fingerprint.

public Schema
findByFingerprint(long
an AVRO-CRC-64 fingerprint long
fingerprint
)

Implements org.apache.avro.message.SchemaStore.findByFingerprint.

Retrieves a fingerprint by its AVRO-CRC-64 fingerprint.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

schemasback to summary
private final Map<Long, Schema> schemas

Constructor Detail

Cacheback to summary
public Cache()

Method Detail

addSchemaback to summary
public void addSchema(Schema schema)

Adds a schema to this cache that can be retrieved using its AVRO-CRC-64 fingerprint.

Parameters
schema:Schema

a Schema

findByFingerprintback to summary
public Schema findByFingerprint(long fingerprint)

Implements org.apache.avro.message.SchemaStore.findByFingerprint.

Doc from org.apache.avro.message.SchemaStore.findByFingerprint.

Retrieves a fingerprint by its AVRO-CRC-64 fingerprint.

Parameters
fingerprint:long

an AVRO-CRC-64 fingerprint long

Returns:Schema

a Schema with the given fingerprint, or null

Annotations
@Override