pl.allegro.tech.hermes.common.schema.SchemaRepositoryFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hermes-common Show documentation
Show all versions of hermes-common Show documentation
Fast and reliable message broker built on top of Kafka.
package pl.allegro.tech.hermes.common.schema;
import org.apache.avro.Schema;
import pl.allegro.tech.hermes.schema.CompiledSchemaRepository;
import pl.allegro.tech.hermes.schema.SchemaRepository;
import pl.allegro.tech.hermes.schema.SchemaVersionsRepository;
public class SchemaRepositoryFactory {
private final SchemaVersionsRepository schemaVersionsRepository;
private final CompiledSchemaRepository compiledAvroSchemaRepository;
public SchemaRepositoryFactory(SchemaVersionsRepository schemaVersionsRepository,
CompiledSchemaRepository compiledAvroSchemaRepository) {
this.schemaVersionsRepository = schemaVersionsRepository;
this.compiledAvroSchemaRepository = compiledAvroSchemaRepository;
}
public SchemaRepository provide() {
return new SchemaRepository(schemaVersionsRepository, compiledAvroSchemaRepository);
}
}