All Downloads are FREE. Search and download functionalities are using the official Maven repository.

pl.allegro.tech.hermes.common.schema.SchemaRepositoryFactory Maven / Gradle / Ivy

There is a newer version: 2.6.21
Show newest version
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);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy