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

com.mageddo.tobby.dagger.TobbyReplicatorConfig Maven / Gradle / Ivy

There is a newer version: 2.1.6-alpha
Show newest version
package com.mageddo.tobby.dagger;

import javax.inject.Singleton;

import com.mageddo.tobby.replicator.ReplicatorConfig;
import com.mageddo.tobby.replicator.Replicators;

import dagger.Component;

@Singleton
@Component(
    modules = {
        ReplicatorsModule.class,
        DaosProducersModule.class,
        DaosProducersBindsModule.class
    }
)
public interface TobbyReplicatorConfig {

  Replicators replicators();

  static Replicators create(ReplicatorConfig replicatorConfig) {
    return DaggerTobbyReplicatorConfig
        .builder()
        .replicatorsModule(new ReplicatorsModule(replicatorConfig))
        .daosProducersModule(new DaosProducersModule(replicatorConfig.getDataSource()))
        .build()
        .replicators();
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy